summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Dowland2015-08-29 10:16:33 +0100
committerMike Swanson2015-08-29 12:06:48 -0700
commit07a52d1c61ca6368fe32e9ee7eb06e6eea8d200b (patch)
tree59c0ff165a2480609fdd38dd584f371dcdaefe3c
parent5240ddc977d2f19e969a6683142e325595eec62c (diff)
downloadchocolate-doom-07a52d1c61ca6368fe32e9ee7eb06e6eea8d200b.tar.gz
chocolate-doom-07a52d1c61ca6368fe32e9ee7eb06e6eea8d200b.tar.bz2
chocolate-doom-07a52d1c61ca6368fe32e9ee7eb06e6eea8d200b.zip
Adjust PACKEDATTR for Clang
Clang defines __GNUC__ but does not support the gnustruct packing attribute, so add some extra #ifdef checks to catch Clang.
-rw-r--r--src/doomtype.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/doomtype.h b/src/doomtype.h
index 5377c8ca..bf0a40e3 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -51,7 +51,13 @@
//
#ifdef __GNUC__
+
+#ifdef __clang__
+#define PACKEDATTR __attribute__((packed))
+#else
#define PACKEDATTR __attribute__((packed,gcc_struct))
+#endif
+
#else
#define PACKEDATTR
#endif