From: Joseph Myers Date: Mon, 19 Jun 2017 16:39:17 +0000 (+0000) Subject: Fix wait3 namespace (bug 21625). X-Git-Tag: glibc-2.26~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf15120dd7860ac976f22e20fa386d8bf73c70e7;p=thirdparty%2Fglibc.git Fix wait3 namespace (bug 21625). The wait3 function was removed in the 2001 edition of POSIX. sys/wait.h wrongly declares it for the 2001 and 2008 editions of POSIX when XSI features are enabled. This patch fixes the conditionals. Tested for x86_64. [BZ #21625] * posix/sys/wait.h (strust rusage forward declaration): Change [__USE_XOPEN_EXTENDED] conditional to [__USE_XOPEN_EXTENDED && !__USE_XOPEN2K]. (wait3): Likewise. --- diff --git a/ChangeLog b/ChangeLog index b3d39a23fdc..0c637c2da96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-06-19 Joseph Myers + [BZ #21625] + * posix/sys/wait.h (strust rusage forward declaration): Change + [__USE_XOPEN_EXTENDED] conditional to [__USE_XOPEN_EXTENDED && + !__USE_XOPEN2K]. + (wait3): Likewise. + * configure.ac (libc_cv_compiler_ok): Require GCC 4.9 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document diff --git a/posix/sys/wait.h b/posix/sys/wait.h index 29ca4537420..6bb6668941f 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -133,7 +133,8 @@ extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, int __options); #endif -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED +#if defined __USE_MISC \ + || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) /* This being here makes the prototypes valid whether or not we have already included to define `struct rusage'. */ struct rusage;