projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix broken lseek on mipsn32 with offsets larger than LONG_MAX
[musl]
/
src
/
time
/
clock_nanosleep.c
diff --git
a/src/time/clock_nanosleep.c
b/src/time/clock_nanosleep.c
index
ec87b9e
..
32f0c07
100644
(file)
--- a/
src/time/clock_nanosleep.c
+++ b/
src/time/clock_nanosleep.c
@@
-1,8
+1,9
@@
#include <time.h>
#include <time.h>
+#include <errno.h>
#include "syscall.h"
#include "syscall.h"
-#include "libc.h"
int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
{
int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
{
- return -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
+ int r = -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
+ return clk == CLOCK_THREAD_CPUTIME_ID ? EINVAL : r;
}
}