projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix wcsncpy writing past end of buffer
[musl]
/
src
/
unistd
/
nice.c
diff --git
a/src/unistd/nice.c
b/src/unistd/nice.c
index
4b28ef4
..
da56996
100644
(file)
--- a/
src/unistd/nice.c
+++ b/
src/unistd/nice.c
@@
-1,7
+1,12
@@
#include <unistd.h>
#include <unistd.h>
+#include <sys/resource.h>
#include "syscall.h"
int nice(int inc)
{
#include "syscall.h"
int nice(int inc)
{
- return syscall1(__NR_nice, inc);
+#ifdef SYS_nice
+ return syscall(SYS_nice, inc);
+#else
+ return setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS, 0)+inc);
+#endif
}
}