diff --git a/newlib/libc/sys/jehanne/libposix_conf.c b/newlib/libc/sys/jehanne/libposix_conf.c index 2b90323a4..63125136b 100644 --- a/newlib/libc/sys/jehanne/libposix_conf.c +++ b/newlib/libc/sys/jehanne/libposix_conf.c @@ -81,7 +81,8 @@ struct Dir { #include #include #include -#define __CYGWIN__ +#include +#define __CYGWIN__ /* needed for O_ACCMODE */ #include #undef __CYGWIN__ @@ -172,6 +173,7 @@ initialize_newlib(void) libposix_translate_open(open_translator); libposix_set_signal_trampoline(signal_trampoline); libposix_translate_error(default_error_translator, 0); + libposix_set_wait_options(0, WNOHANG, 0); /* error numbers */ libposix_define_errno(PosixE2BIG, E2BIG); diff --git a/newlib/libc/sys/jehanne/syscalls.c b/newlib/libc/sys/jehanne/syscalls.c index a388bbd6f..e9899f3ca 100644 --- a/newlib/libc/sys/jehanne/syscalls.c +++ b/newlib/libc/sys/jehanne/syscalls.c @@ -172,6 +172,13 @@ _wait_r(struct _reent *r, int *status) return POSIX_wait(errnop, status); } +pid_t +waitpid (pid_t reqpid, int *status, int options) +{ + int *errnop = &_REENT->_errno; + return POSIX_waitpid(errnop, reqpid, status, options); +} + long _write_r(struct _reent *r, int fd, const void *buf, size_t len) {