diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-01-06 13:46:34 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-01-06 13:46:34 +0100 |
commit | 5fc94b05da91439d9f62e8d1098d463b1f548da4 (patch) | |
tree | e16223c482f1a1bc680f7bd5773863b783378619 /compiler.h | |
parent | 1073ece433c9922fab10edebae7b6f9d0115da8f (diff) |
compiler: Avoid redefinitions of __unused and __packed
FreeBSD defines these in sys/cdefs.h
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'compiler.h')
-rw-r--r-- | compiler.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -22,8 +22,12 @@ #ifdef __GNUC__ # define __noreturn __attribute__((noreturn)) # define __warn_unused_result __attribute__((warn_unused_result)) -# define __packed __attribute__((packed)) -# define __unused __attribute__((unused)) +# ifndef __packed +# define __packed __attribute__((packed)) +# endif +# ifndef __unused +# define __unused __attribute__((unused)) +# endif # ifndef offsetof # define offsetof(a, b) __builtin_offsetof(a, b) # endif |