Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ambrop72/badvpn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmbroz Bizjak <ambrop7@gmail.com>2016-11-13 18:52:10 +0300
committerAmbroz Bizjak <ambrop7@gmail.com>2016-11-13 18:52:10 +0300
commit2b6f4d55052a8bcca3c0c8a1241a6b3946a791da (patch)
tree4992b96e11d29d8c6ee12caefdda844e7a89877d
parente4c152027c7e5f61fa4b8eaace45546635dae643 (diff)
Workaround issue with structure packing not working on gcc/windows.
-rw-r--r--misc/packed.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/packed.h b/misc/packed.h
index 2175536..c651bc7 100644
--- a/misc/packed.h
+++ b/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