diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | posix/sys/wait.h | 11 |
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index bb61911610..1d0d2fb221 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-06-09 Joseph Myers <joseph@codesourcery.com> + + [BZ #21560] + * posix/sys/wait.h: Condition include of <signal.h> on + [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. Include <bits/types.h> + unconditionally. + [!__pid_t_defined] (pid_t): Define typedef. + 2017-06-09 Zack Weinberg <zackw@panix.com> * 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 <signal.h> +#include <bits/types.h> +#ifndef __pid_t_defined +typedef __pid_t pid_t; +# define __pid_t_defined +#endif + +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +# include <signal.h> +#endif /* These macros could also be defined in <stdlib.h>. */ #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 <bits/types.h> typedef __id_t id_t; # define __id_t_defined # endif |