summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler.h b/compiler.h
index 9af5dc6c9..a2d5959e4 100644
--- a/compiler.h
+++ b/compiler.h
@@ -12,6 +12,12 @@
#define QEMU_WARN_UNUSED_RESULT
#endif
+#if defined(_WIN32)
+# define QEMU_PACKED __attribute__((gcc_struct, packed))
+#else
+# define QEMU_PACKED __attribute__((packed))
+#endif
+
#define QEMU_BUILD_BUG_ON(x) \
typedef char qemu_build_bug_on__##__LINE__[(x)?-1:1];