Re: git: 74e014dbfab5 - main - sys/_bitset.h: Fix fall-out from commit 5e04571cf3c
- In reply to: Stefan Eßer : "git: 74e014dbfab5 - main - sys/_bitset.h: Fix fall-out from commit 5e04571cf3c"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Dec 2021 22:27:45 UTC
Am 07.12.21 um 20:28 schrieb Stefan Eßer: > The branch main has been updated by se: > > URL: https://cgit.FreeBSD.org/src/commit/?id=74e014dbfab5d64acb3376ba77d5d61c4abf27d5 > > commit 74e014dbfab5d64acb3376ba77d5d61c4abf27d5 > Author: Konstantin Belousov <kib@FreeBSD.org> > AuthorDate: 2021-12-07 19:15:30 +0000 > Commit: Stefan Eßer <se@FreeBSD.org> > CommitDate: 2021-12-07 19:28:22 +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 global variable "bitset" had been overlooked. > This name space pollution caused a compile failure in print/miktex. > > This commit renames the bitset variable to __bitset with the same > mapping back to the bitset if _KERNEL or _WANT_FREEBSD_BITSET is > defined. > > This fix has been suggested by kib. It has been tested to let the > build of the print/miktex port succeed and to not break buildworld. > > This commit shall be MFCed together with commit 5e04571cf3c. > > Reported by: arrowd > MFC after: 1 month > --- > sys/sys/_bitset.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h > index 1c167daf3f09..8ce63233389a 100644 > --- a/sys/sys/_bitset.h > +++ b/sys/sys/_bitset.h > @@ -61,11 +61,13 @@ struct _t { \ > * Define a default type that can be used while manually specifying size > * to every call. > */ > -__BITSET_DEFINE(bitset, 1); > +__BITSET_DEFINE(__bitset, 1); > > #if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET) > #define BITSET_DEFINE(_t, _s) __BITSET_DEFINE(_t, _s) > #define BITSET_DEFINE_VAR(_t) __BITSET_DEFINE_VAR(_t) > + > +#define bitset __bitset > #endif > > #endif /* !_SYS__BITSET_H_ */ > This commit caused a build failure in PowerPC64 specific kernel code. I'm testing an alternative with "make universe" and will revert this commit and replace it by one that works on all architectures as soon as the make job has finished.