From 0d401928b876d75ea6f85a4e305f945d946adde4 Mon Sep 17 00:00:00 2001 From: Chris Webb Date: Sat, 9 Dec 2023 14:15:08 +0000 Subject: [PATCH] bcachefs-tools: Guard the __struct_group() #define in kernel.h Our include/linux/byteorder.h uses the system because we don't provide our own in include/asm. This then pulls in system 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 Signed-off-by: Kent Overstreet --- include/linux/kernel.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 6315e53..6f56748 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -99,11 +99,14 @@ (type *)((char *)__mptr - offsetof(type, member)); }) #endif +#ifndef __struct_group #define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \ union { \ struct { MEMBERS } ATTRS; \ struct TAG { MEMBERS } ATTRS NAME; \ } +#endif + #define struct_group(NAME, MEMBERS...) \ __struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS) -- 2.39.2