foxygit / doom Log in
commit 597d49890ae3ec027b0a536ea708adf180202072
Author:     Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Sat Aug 29 10:16:33 2015 +0100
Commit:     Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Sat Aug 29 10:17:49 2015 +0100

    Adjust PACKEDATTR for Clang

    Clang defines __GNUC__ but does not support the gnustruct packing
    attribute, so add some extra #ifdef checks to catch Clang.
---
 src/doomtype.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/doomtype.h b/src/doomtype.h
index 1883344c..4dc11061 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