diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2026-02-23 09:45:58 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2026-02-23 10:05:06 +0000 |
| commit | 0076f6d1ad05e80d372bef1caf15615cd639fb5c (patch) | |
| tree | 9bb8172f407ce1569780d4cb458730bd8917ecee | |
| parent | ab835b37075e6478ef82f8c807a2335f5d19edaf (diff) | |
sys/_offsetof.h: pacify GCC 12's macro redefinition check
GCC 12 has a strict definition of identity (all characters including
whitespace must be identical) when comparing "redefined" macros. Make
our definition exactly match the stddef.h that comes with GCC to fix
test-includes of netlink/netlink_snl.h. (Note: later versions of GCC
are a bit more flexible and don't have this problem.)
Reported by: des
Sponsored by: DARPA, AFRL
Fixes: 2adc3f0db187 ("stddef.h: centralize definition of offsetof()")
| -rw-r--r-- | sys/sys/_offsetof.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/_offsetof.h b/sys/sys/_offsetof.h index 25982fad774a..7a38914818a0 100644 --- a/sys/sys/_offsetof.h +++ b/sys/sys/_offsetof.h @@ -13,7 +13,7 @@ #define _SYS__OFFSETOF_H_ #ifndef offsetof -#define offsetof(type, field) __builtin_offsetof(type, field) +#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) #endif #endif /* _SYS__OFFSETOF_H_ */ |
