From nobody Wed Dec 15 19:46:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8E74B18E9A8A; Wed, 15 Dec 2021 19:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JDm3M0L4Yz3qtH; Wed, 15 Dec 2021 19:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF4EA2215F; Wed, 15 Dec 2021 19:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BFJksQC066642; Wed, 15 Dec 2021 19:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BFJks36066641; Wed, 15 Dec 2021 19:46:54 GMT (envelope-from git) Date: Wed, 15 Dec 2021 19:46:54 GMT Message-Id: <202112151946.1BFJks36066641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: aee99ab4fe38 - main - cross-build: Add comment missing from 9e5b0d9eac5b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aee99ab4fe38bdc1dd1be88755d99ff4ee78ec09 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639597615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MI9epwesZas/RPmeyqNsmPWnC778Il26Dcls6HBswxQ=; b=lz9PoTIqvKZxb1xFtARt6GCFCuhYPLI8FL6LIETxrvkOZDrwzELAw6Ntc1V8Hy8cTnZcGK nF9UE0k69tMirWWzHa/0XH40qjMfEiAMzTFgwZv/jH3KVc+Hz6hFSV7Sxgq6ZUaB2V/0Mg 63HIBsTtjidayVkmNIML5vzjwGjIxKNrYBDvCVf7cEjgOCnClp/zytvJ+zbF1tBGWoWB/z i1t0kLf/kSuYcXTJ6nf3eDZE8SF9WDRVWzUiikuM0O1raZ4Ic6/TjvB9ecAOwvPIcvERvs 0jKzxeets9p5yt7rQwR3bPBloLyjjDR1gGaZT2wm9ahjxKAOqdtH1xSFUqFSQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639597615; a=rsa-sha256; cv=none; b=XyeWTZWfw7jDFG2d43i/xJmIETlcnWygm7hFDNkvRh46s+WTh1wUCRaei2PTVVtyB8vqZ8 eIA28IxNxC16XTnFoch6R/YkKeLYShhHQRH2RXqjM4vWvce5BF30PTqrtSFmVM8vEAprzR h8q2rKHFrg85CUY+zwZjrPe6S08NICErLzvViX3ZySLbXydSIz6FhkTgQ15OjX2aiJ8dN5 Cpjt1N7N+gR4md8gkiIja8cmqBaYgLSc+R6EO9TyDf76JZJ8rh+5RzX10gFz5p8MOyjzKf 7IaRNIMBYBEZBKMIyxim1KinryHpMFTYHlbpg1c9SrK4x9uzkqU9JXtGOVn8Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aee99ab4fe38bdc1dd1be88755d99ff4ee78ec09 commit aee99ab4fe38bdc1dd1be88755d99ff4ee78ec09 Author: Jessica Clarke AuthorDate: 2021-12-15 19:45:31 +0000 Commit: Jessica Clarke CommitDate: 2021-12-15 19:45:31 +0000 cross-build: Add comment missing from 9e5b0d9eac5b Whilst the commit message documented some of the details, I had intended to include this comment in the actual header, but failed to amend the commit properly. Fixes: 9e5b0d9eac5b ("cross-build: Fix bmake bootstrap with glibc 2.34") MFC after: 1 week --- tools/build/cross-build/include/linux/sys/wait.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/wait.h b/tools/build/cross-build/include/linux/sys/wait.h index 2721218a83d4..ca17bfae9b8a 100644 --- a/tools/build/cross-build/include/linux/sys/wait.h +++ b/tools/build/cross-build/include/linux/sys/wait.h @@ -27,5 +27,21 @@ #pragma once +/* + * glibc's sys/wait.h and stdlib.h both define various wait-related constants, + * depending on __USE_XOPEN(2K8) and if the other header has been included. + * Since they each probe the other's include guard to determine that, there is + * a window between a header defining its include guard and checking for the + * other's within which, if the other is included for the first time, they both + * believe the other has already defined the relevant macros etc, and so + * neither ends up doing so. This was not previously hit, and is still not hit + * when using glibc normally (though seems extremely fragile). However, as of + * glibc 2.34, signal.h, included by sys/wait, includes a new bits/sigstksz, + * which in turn includes unistd.h (when _SC_SIGSTKSZ_SOURCE is defined, which + * is implied by _GNU_SOURCE), which we wrap and include stdlib.h from, + * creating the exact aforementioned situation that breaks. Thus, forcefully + * include stdlib.h first whenever sys/wait.h is as a workaround, since that + * way round still works. + */ #include #include_next