From b14fd7ed1bdbe0644601b9f0e854af1b19811f30 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 3 Feb 2016 11:28:44 +0100 Subject: [PATCH] built_in: Include stddef.h to avoid redefinition of offsetof() macro The stddef.h header might define the offsetof() macro unconditionally, leading to the macro being redefined if built_in.h is included _before_ stddef.h. This will lead sparse to complain as follows: /usr/lib/gcc/x86_64-linux-gnu/4.8//include/stddef.h:413:9: warning: preprocessor token offsetof redefined ./built_in.h:151:10: this was the original definition Fix this by explicitly including stddef.h in built_in.h Signed-off-by: Tobias Klauser --- built_in.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/built_in.h b/built_in.h index 6ebf27ec..d10579ab 100644 --- a/built_in.h +++ b/built_in.h @@ -3,12 +3,13 @@ /* Parts taken from the Linux kernel, GPL, version 2. */ +#include +#include #include #include #include #include #include -#include typedef uint64_t u64; typedef uint32_t u32; -- 2.11.4.GIT