From b49ab5f4503f36dcbf43f821f817da66b2931fe6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 14 Apr 2016 08:54:57 +0200 Subject: Remove union wait [BZ #19613] The overloading approach in the W* macros was incompatible with integer expressions of a type different from int. Applications using union wait and these macros will have to migrate to the POSIX-specified int status type. --- sysdeps/unix/bsd/wait.c | 2 +- sysdeps/unix/bsd/wait3.c | 2 +- sysdeps/unix/bsd/waitpid.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/bsd') diff --git a/sysdeps/unix/bsd/wait.c b/sysdeps/unix/bsd/wait.c index 31de60e764..a9e29f21f7 100644 --- a/sysdeps/unix/bsd/wait.c +++ b/sysdeps/unix/bsd/wait.c @@ -23,7 +23,7 @@ /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t -__libc_wait (__WAIT_STATUS_DEFN stat_loc) +__libc_wait (int *stat_loc) { return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); } diff --git a/sysdeps/unix/bsd/wait3.c b/sysdeps/unix/bsd/wait3.c index 3f95ac7881..ee33a657e9 100644 --- a/sysdeps/unix/bsd/wait3.c +++ b/sysdeps/unix/bsd/wait3.c @@ -25,7 +25,7 @@ there. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ pid_t -__wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage) +__wait3 (int *stat_loc, int options, struct rusage *usage) { return __wait4 (WAIT_ANY, stat_loc, options, usage); } diff --git a/sysdeps/unix/bsd/waitpid.c b/sysdeps/unix/bsd/waitpid.c index 083c686ad0..cfe56141a3 100644 --- a/sysdeps/unix/bsd/waitpid.c +++ b/sysdeps/unix/bsd/waitpid.c @@ -35,7 +35,7 @@ pid_t __waitpid (pid_t pid, int *stat_loc, int options) { - return __wait4 (pid, (union wait *) stat_loc, options, NULL); + return __wait4 (pid, stat_loc, options, NULL); } libc_hidden_def (__waitpid) -- cgit v1.2.3