From c679de21fdec7cf80a180f47b98a3d63942920d2 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Tue, 9 May 2017 01:08:37 +0200 Subject: [PATCH] jehanne: fix usleep --- newlib/libc/sys/jehanne/syscalls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/newlib/libc/sys/jehanne/syscalls.c b/newlib/libc/sys/jehanne/syscalls.c index b29ff11b2..f1040d4eb 100644 --- a/newlib/libc/sys/jehanne/syscalls.c +++ b/newlib/libc/sys/jehanne/syscalls.c @@ -21,6 +21,7 @@ #include typedef unsigned long clock_t; +typedef unsigned long useconds_t; extern void initialize_newlib(void); static void newlib(int argc, char *argv[]) __attribute__((noreturn)); @@ -200,6 +201,13 @@ sleep(unsigned int seconds) return POSIX_sleep(seconds); } +int +usleep(useconds_t usec) +{ + int *errnop = &_REENT->_errno; + return POSIX_usleep(errnop, usec); +} + int pipe(int fildes[2]) {