Skip to content

Commit 55037ed

Browse files
tstrukkees
authored andcommitted
uapi/linux/stddef.h: Add include guards
Add include guard wrapper define to uapi/linux/stddef.h to prevent macro redefinition errors when stddef.h is included more than once. This was not needed before since the only contents already used a redefinition test. Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org> Link: https://lore.kernel.org/r/20220329171252.57279-1-tadeusz.struk@linaro.org Fixes: 50d7bd3 ("stddef: Introduce struct_group() helper macro") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
1 parent 229a08a commit 55037ed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/uapi/linux/stddef.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
#ifndef _UAPI_LINUX_STDDEF_H
3+
#define _UAPI_LINUX_STDDEF_H
4+
25
#include <linux/compiler_types.h>
36

47
#ifndef __always_inline
@@ -41,3 +44,4 @@
4144
struct { } __empty_ ## NAME; \
4245
TYPE NAME[]; \
4346
}
47+
#endif

0 commit comments

Comments
 (0)