diff --git a/ChangeLog b/ChangeLog index bb61911610..1d0d2fb221 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-06-09 Joseph Myers + + [BZ #21560] + * posix/sys/wait.h: Condition include of on + [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. Include + unconditionally. + [!__pid_t_defined] (pid_t): Define typedef. + 2017-06-09 Zack Weinberg * include/errno.h (__errno_location): Use __attribute_const__ diff --git a/posix/sys/wait.h b/posix/sys/wait.h index d5b7e4d8d4..909979bc9d 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -26,7 +26,15 @@ __BEGIN_DECLS -#include +#include +#ifndef __pid_t_defined +typedef __pid_t pid_t; +# define __pid_t_defined +#endif + +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +# include +#endif /* These macros could also be defined in . */ #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) @@ -98,7 +106,6 @@ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # ifndef __id_t_defined -# include typedef __id_t id_t; # define __id_t_defined # endif