diff options
-rw-r--r-- | otherlibs/threads/scheduler.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/otherlibs/threads/scheduler.c b/otherlibs/threads/scheduler.c index 33a02be5b..ff627f77c 100644 --- a/otherlibs/threads/scheduler.c +++ b/otherlibs/threads/scheduler.c @@ -26,7 +26,8 @@ #if ! (defined(HAS_SELECT) && \ defined(HAS_SETITIMER) && \ - defined(HAS_GETTIMEOFDAY)) + defined(HAS_GETTIMEOFDAY) && \ + (defined(HAS_WAITPID) || defined(HAS_WAIT4))) #include "Cannot compile libthreads, system calls missing" #endif @@ -50,6 +51,10 @@ typedef int fd_set; #define FD_ZERO(fds) (*(fds) = 0) #endif +#ifndef HAS_WAITPID +#define waitpid(pid,status,opts) wait4(pid,status,opts,NULL) +#endif + /* Configuration */ /* Initial size of stack when a thread is created (4 Ko) */ |