shithub: choc

Download patch

ref: 9d814494e521de5d75dc10d032da67cc28f9820a
parent: f804a75c2ea6188254bfe4eb3e0b88913bb61158
author: Fabian Greffrath <[email protected]>
date: Mon Aug 24 15:14:05 EDT 2015

Apply gcc_struct tag to packed structs

GCC fails to properly pack structs although they are tagged with
__attribute__((__packed__)) if called with -mms-bitfields which has
become the default on Windows at some point:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991

--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -51,7 +51,7 @@
 //
 
 #ifdef __GNUC__
-#define PACKEDATTR __attribute__((packed))
+#define PACKEDATTR __attribute__((packed,gcc_struct))
 #else
 #define PACKEDATTR
 #endif