From b9a8447dc08ffac071f91b3bc64df0cb3ff40f0a Mon Sep 17 00:00:00 2001 From: Simon Danner Date: Sun, 3 Apr 2022 19:36:27 +0200 Subject: [PATCH] LibC: Add a stub for nice() --- Userland/Libraries/LibC/unistd.cpp | 7 +++++++ Userland/Libraries/LibC/unistd.h | 1 + 2 files changed, 8 insertions(+) diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp index cd88b63a90..77420a3e61 100644 --- a/Userland/Libraries/LibC/unistd.cpp +++ b/Userland/Libraries/LibC/unistd.cpp @@ -995,4 +995,11 @@ int getdtablesize() int rc = getrlimit(RLIMIT_NOFILE, &dtablesize); __RETURN_WITH_ERRNO(rc, dtablesize.rlim_cur, rc); } + +// https://pubs.opengroup.org/onlinepubs/007904975/functions/nice.html +int nice(int incr) +{ + dbgln("FIXME: nice was called with: {}, not implemented", incr); + return incr; +} } diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index a5082dcd03..1d1e1b99da 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -120,6 +120,7 @@ char* getpass(char const* prompt); int pause(void); int chroot(char const*); int getdtablesize(void); +int nice(int incr); enum { _PC_NAME_MAX,