mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
bcachefs-tools: Guard the __struct_group() #define in kernel.h
Our include/linux/byteorder.h uses the system <asm/byteorder.h> because we don't provide our own in include/asm. This then pulls in system <linux/stddef.h> which defines __struct_group. That definition collides with the unconditional #define __struct_group in our local include/linux/kernel.h, provoking preprocessor warnings. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
872cd437e7
commit
0d401928b8
@ -99,11 +99,14 @@
|
|||||||
(type *)((char *)__mptr - offsetof(type, member)); })
|
(type *)((char *)__mptr - offsetof(type, member)); })
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __struct_group
|
||||||
#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
|
#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
|
||||||
union { \
|
union { \
|
||||||
struct { MEMBERS } ATTRS; \
|
struct { MEMBERS } ATTRS; \
|
||||||
struct TAG { MEMBERS } ATTRS NAME; \
|
struct TAG { MEMBERS } ATTRS NAME; \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define struct_group(NAME, MEMBERS...) \
|
#define struct_group(NAME, MEMBERS...) \
|
||||||
__struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS)
|
__struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user