From nobody Wed Dec 08 07:53:57 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 D462818D3D7A; Wed, 8 Dec 2021 07:53:57 +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 4J88Yx400Nz4VdB; Wed, 8 Dec 2021 07:53:57 +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 690E57651; Wed, 8 Dec 2021 07:53:57 +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 1B87rvqc043608; Wed, 8 Dec 2021 07:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B87rviH043607; Wed, 8 Dec 2021 07:53:57 GMT (envelope-from git) Date: Wed, 8 Dec 2021 07:53:57 GMT Message-Id: <202112080753.1B87rviH043607@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: 49c2c62889b0 - 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: 49c2c62889b06d781c5e1f96bce0e26fd21ceb04 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638950037; 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=27L8z56ODYTTteRhVIuAzMoSIQRFsIc1aF0jsznsgE0=; b=a+65ITS/5xDjkU/WBwpl0W7jbDQ9vUbpUCjLIchYFDKTpw3M1tqVZkRg8TlVpwabuDmhLP KO2dcMyrEaEsu+azKsEbPnXY16aqUu+K6v/RHa2Xwa2wApkSXcfIpddL6P5yhIQoJTwLp3 iM54kqR52lKR8bS52X0yrp3z1QMEJTBVE/7pCWftyr9HABPLcZEA3GbhSq1Koi3CGc6Ih4 b/64A5A6/Z7z2DJusPaw4isgV7P6mRLkvy0taoWkocdd0h+2bsTkumqWgIYX9rNyHIW3qw /o1Y0KyP8CXGPAYrD+BbHpNztlRDcVHXfUxmZjGcIb91mTGUVpxa4mYKlDMBRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638950037; a=rsa-sha256; cv=none; b=jvrIHX7IDm2fWhygwqJoJQi5BsngCVkWtyIpC35A2oqj7vDq4Zt66IMVbbRAi/YdhFhRbr mX45RU4oFPqJBuIL+tiousSAB3Vy6cEdfmwMrwrIi1pj2OWpn1EyzFc/xa0/fEWjHp80fk +ibg8d+c1JXRTkSRbr16rVVhjGAB/SzV4BUUhPpWgb7v2EcVszvK1GyE1LWJBIoamvh2jV o5shTseWlK2KELISvh1yRlPOy1XQo4WpUtAk8sGJlnHBHcO1bW4NxvmG0m+vLqqxFcCpAx Z5Ra0xMQY9+CivVqWPm0MdvUVz3uXTCtCR/IMa04b49iLo5UqEpWIJ3uiLuN1w== 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=49c2c62889b06d781c5e1f96bce0e26fd21ceb04 commit 49c2c62889b06d781c5e1f96bce0e26fd21ceb04 Author: Stefan Eßer AuthorDate: 2021-12-08 07:47:42 +0000 Commit: Stefan Eßer CommitDate: 2021-12-08 07:52:56 +0000 sys/_bitset.h: Fix fall-out from commit 5e04571cf3c The changes to the bitset macros allowed sched.h to be included into userland programs without name space pollution due to BIT_* and BITSET_* macros. The definition of a "struct bitset" had been overlooked. This name space pollution caused the build of port print/miktex to fail. This commit makes the definition of struct bitset depend on the same condition as the visibility of the BIT_* and BITSET_* macros, i.e. needs _KERNEL or _WANT_FREEBSD_BITSET to be defined before including sys/_bitset.h. It has been tested with "make universe" since a prior attempt to fix the issue broke the PowerPC64 kernel build. This commit shall be MFCed together with commit 5e04571cf3c. Reported by: arrowd MFC after: 1 month --- sys/sys/_bitset.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h index 1c167daf3f09..70b9713ffada 100644 --- a/sys/sys/_bitset.h +++ b/sys/sys/_bitset.h @@ -52,7 +52,7 @@ struct _t { \ /* * Helper to declare a bitset without it's size being a constant. * - * Sadly we cannot declare a bitset struct with '__bits[]', because it's + * Sadly we cannot declare a bitset struct with 'bits[]', because it's * the only member of the struct and the compiler complains. */ #define __BITSET_DEFINE_VAR(_t) __BITSET_DEFINE(_t, 1) @@ -61,11 +61,12 @@ struct _t { \ * Define a default type that can be used while manually specifying size * to every call. */ -__BITSET_DEFINE(bitset, 1); #if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) +__BITSET_DEFINE(bitset, 1); + #define BITSET_DEFINE(_t, _s) __BITSET_DEFINE(_t, _s) #define BITSET_DEFINE_VAR(_t) __BITSET_DEFINE_VAR(_t) -#endif +#endif /* defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) */ #endif /* !_SYS__BITSET_H_ */