From patchwork Mon Jun 19 16:17:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 21096 Received: (qmail 68710 invoked by alias); 19 Jun 2017 16:17:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 68338 invoked by uid 89); 19 Jun 2017 16:17:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1055 X-HELO: relay1.mentorg.com Date: Mon, 19 Jun 2017 16:17:21 +0000 From: Joseph Myers To: Subject: Fix wait3 namespace (bug 21625) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) 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. 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. diff --git a/posix/sys/wait.h b/posix/sys/wait.h index 29ca453..6bb6668 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;