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: 2adc3f0db1 ("stddef.h: centralize definition of offsetof()")
This commit is contained in:
+1
-1
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user