diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2016-02-03 11:28:44 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-02-03 11:28:44 +0100 |
commit | b14fd7ed1bdbe0644601b9f0e854af1b19811f30 (patch) | |
tree | 9aeed4e6bc714754e70343338e888b7eb071edff | |
parent | 83c1bb0a8271338c57ab1c7d9d9bc3e53aafb314 (diff) |
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 <tklauser@distanz.ch>
-rw-r--r-- | built_in.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,12 +3,13 @@ /* Parts taken from the Linux kernel, GPL, version 2. */ +#include <stddef.h> +#include <stdint.h> #include <linux/if_packet.h> #include <assert.h> #include <endian.h> #include <byteswap.h> #include <asm/byteorder.h> -#include <stdint.h> typedef uint64_t u64; typedef uint32_t u32; |