]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/src/thread/thrd_sleep.c
Update to musl 1.1.24.
[wasi-libc.git] / libc-top-half / musl / src / thread / thrd_sleep.c
index e8dfe400cb701f7ae470b192ec04c495a7bfbb18..97de53455ede450885fcd6bdd6bb6de09b97071a 100644 (file)
@@ -1,10 +1,11 @@
 #include <threads.h>
+#include <time.h>
 #include <errno.h>
 #include "syscall.h"
 
 int thrd_sleep(const struct timespec *req, struct timespec *rem)
 {
-       int ret = __syscall(SYS_nanosleep, req, rem);
+       int ret = -__clock_nanosleep(CLOCK_REALTIME, 0, req, rem);
        switch (ret) {
        case 0:      return 0;
        case -EINTR: return -1; /* value specified by C11 */