Parcourir la source

Workaround issue with structure packing not working on gcc/windows.

Ambroz Bizjak il y a 9 ans
Parent
commit
2b6f4d5505
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      misc/packed.h

+ 5 - 0
misc/packed.h

@@ -44,7 +44,12 @@
 
 #define B_START_PACKED
 #define B_END_PACKED
+#if defined(__GNUC__) && defined(__MINGW32__)
+// Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
+#define B_PACKED __attribute__((packed)) __attribute__((gcc_struct))
+#else
 #define B_PACKED __attribute__((packed))
+#endif
 
 #endif