From nobody Tue Dec 07 19:35:53 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 38F8818CFC09; Tue, 7 Dec 2021 19:35:54 +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 4J7rBK6n7lz4n3c; Tue, 7 Dec 2021 19:35:53 +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 BE8CE2589C; Tue, 7 Dec 2021 19:35:53 +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 1B7JZrie054788; Tue, 7 Dec 2021 19:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B7JZrns054787; Tue, 7 Dec 2021 19:35:53 GMT (envelope-from git) Date: Tue, 7 Dec 2021 19:35:53 GMT Message-Id: <202112071935.1B7JZrns054787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 22c4ab6cb015 - main - sys/_bitset.h: Fix fall-out from commit 5e04571cf3c 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22c4ab6cb015dc99eb82504e5fd957662cded3c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638905754; 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=Drz3VdVUnPL5S1u/88T8MjNIZBVMYOHwbVDB+PY3F+w=; b=cfHPxVq4LBjyOYrCICQ9g9tMRo2Cty5GLMcPYzZk4L7nFavGc6RSx+lA+Z1Wm9rrAu+0RM Gg4v2nqDzFrQXaGO8nwiI6Ap8qqmfyCGQus/kHEDp7tbvK7K7XFoqgMfYEdbLtPVDRs46m jtookkhQYl2q022ftDvDgW4rR9iJhnC/F1pzeGsZdFNikJytKbZfOzEhucLdV1C3/sC+xn C7/ddsPv/at8A6Tsp98g6xbjqzJsjyEWMSbIumPVUfyrc6SNe75OfiDrX8CWDszazJs3CE l/yTZ2V1nGVvTB61ilKaEpsm6DoVWfnuHDSzGkF2mW/+A4pSb8XFVJ0B6kLBGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638905754; a=rsa-sha256; cv=none; b=TEatYS/W201bcsejH0BfpddpveTulQ/4QPlC4H3yV32mjYoXv8YElpFjytNdaz45YFiRmZ UGnXeQAalhvRGABJPQX+EcHUAY7FKgsSCv/ENaxOZzaaeYfNyiUq25ht993ndhNcFemRtt daOM3C6fs0aGcFw9otgS8mw5hjeSvTHNXyehzJUboTNsVs55iXkuyH7jmeQ6rT1QUOz8UF hlx/BVXXygErkwaWWO8s+WB5UOw4b2xBrDrdAfoPsmFzi89df8eOkIni1/WNFyVzcQlwRo tPsFZArykrjWlYcqw6+s7jF0/m8f8Z67/YM0RP1rPW/P/K99bHudw7q+WLe50w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=22c4ab6cb015dc99eb82504e5fd957662cded3c3 commit 22c4ab6cb015dc99eb82504e5fd957662cded3c3 Author: Stefan Eßer AuthorDate: 2021-12-07 19:29:26 +0000 Commit: Stefan Eßer CommitDate: 2021-12-07 19:29:26 +0000 sys/_bitset.h: Fix fall-out from commit 5e04571cf3c There is a reference to malloc() in #define __BITSET_ALLOC. Even though this macro is only defined but not used, it causes the lang/gcc ports to fail. The gcc ports "poison" a number of functions including malloc() and prevent their use (including in macro definitions). This commit moved the declaration of __BITSET_ALLOC into the conditional block that depends on _KERNEL or _WANT_FREEBSD_BITSET being defined. There is no use of __BITSET_ALLOC in the FreeBSD sources, and userland programs that want to use BITSEC_ALLOC will define _WANT_FREEBSD_BITSET anyway. This patch has been tested by building lang/gcc11 and a successful make buildworld. This commit shall be MFCed together with commit 5e04571cf3c. MFC after: 1 month --- sys/sys/bitset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 91a5e6e37db3..47c4106d4127 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -308,12 +308,12 @@ #define __BITSET_SIZE(_s) (__bitset_words((_s)) * sizeof(long)) +#if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) /* * Dynamically allocate a bitset. */ #define __BITSET_ALLOC(_s, mt, mf) malloc(__BITSET_SIZE((_s)), mt, (mf)) -#if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) #define BIT_AND(_s, d, s) __BIT_AND(_s, d, s) #define BIT_AND2(_s, d, s1, s2) __BIT_AND2(_s, d, s1, s2) #define BIT_ANDNOT(_s, d, s) __BIT_ANDNOT(_s, d, s) @@ -355,6 +355,6 @@ #define BITSET_FSET(n) __BITSET_FSET(n) #define BITSET_SIZE(_s) __BITSET_SIZE(_s) #define BITSET_T_INITIALIZER(x) __BITSET_T_INITIALIZER(x) -#endif +#endif /* defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) */ #endif /* !_SYS_BITSET_H_ */