summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler.h b/compiler.h
index 0921edd..a6bf3a6 100644
--- a/compiler.h
+++ b/compiler.h
@@ -20,10 +20,12 @@
#define COMPILER_H
#ifdef __GNUC__
-# define __noreturn __attribute__((noreturn))
-# define __packed __attribute__((packed))
-# define __unused __attribute__((unused))
-# define offsetof(a, b) __builtin_offsetof(a, b)
+# define __noreturn __attribute__((noreturn))
+# define __packed __attribute__((packed))
+# define __unused __attribute__((unused))
+# ifndef offsetof
+# define offsetof(a, b) __builtin_offsetof(a, b)
+# endif
#else
# define __noreturn
# define __packed