From: Eli Zaretskii Date: Wed, 24 May 2017 21:35:59 +0000 (+0000) Subject: waitpid.c (wait): Define as a macro that calls _cwait, so that this function works... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ab4db9379e5096a04c4c68b9edfef9c938cf3b5;p=gcc.git waitpid.c (wait): Define as a macro that calls _cwait, so that this function works on MinGW. 2017-05-24 Eli Zaretskii * libiberty/waitpid.c (wait) [__MINGW32__]: Define as a macro that calls _cwait, so that this function works on MinGW. From-SVN: r248430 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 14e7e3258f9..c779928934a 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2017-05-24 Eli Zaretskii + + * waitpid.c (wait) [__MINGW32__]: Define as a macro + that calls _cwait, so that this function works on MinGW. + 2017-05-02 Iain Buclaw * d-demangle.c (dlang_hexdigit): New function. diff --git a/libiberty/waitpid.c b/libiberty/waitpid.c index fd519d7696e..c0e9c3e0ca9 100644 --- a/libiberty/waitpid.c +++ b/libiberty/waitpid.c @@ -23,6 +23,11 @@ does the return value. The third argument is unused in @libib{}. #include #endif +#ifdef __MINGW32__ +#include +#define wait(s) _cwait(s,pid,_WAIT_CHILD) +#endif + pid_t waitpid (pid_t pid, int *stat_loc, int options ATTRIBUTE_UNUSED) {