From 454668e5b2e371fa51c49b1a72dcd06dfd69e660 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Sat, 28 Dec 2024 14:57:09 -0700 Subject: [PATCH] qemu/compiler.h: Drop gcc_struct attribute in QEMU_PACKED This attribute was added in 0f7fdd3 to reverse the effects of -mms-bitfields, which is enabled by default when building for Windows. Let's just align with other libraries. Really all structures using QEMU_PACKED should be audited for bitfield packing dependency, but it mostly looks to be applied to structs without bitfields. --- include/qemu/compiler.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 756ec181b6..7375ea09a6 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,12 +22,7 @@ #define QEMU_EXTERN_C extern #endif -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define QEMU_PACKED __attribute__((gcc_struct, packed)) -#else -# define QEMU_PACKED __attribute__((packed)) -#endif - +#define QEMU_PACKED __attribute__((packed)) #define QEMU_ALIGNED(X) __attribute__((aligned(X))) #ifndef glue