]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets
authorCao Jiaxi <driver1998@foxmail.com>
Tue, 7 May 2019 11:55:02 +0000 (12:55 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 7 May 2019 11:55:02 +0000 (12:55 +0100)
gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets.

Signed-off-by: Cao Jiaxi <driver1998@foxmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20190503003618.10089-1-driver1998@foxmail.com
[PMM: dropped the slirp change as slirp is now a submodule]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
contrib/libvhost-user/libvhost-user.h
include/qemu/compiler.h
scripts/cocci-macro-file.h

index 414ceb0a2f97ff2fbc8d46a4f00f485320b35e32..78b33306e813fd817ef7c145a7467bfc8da11477 100644 (file)
@@ -148,7 +148,7 @@ typedef struct VhostUserInflight {
     uint16_t queue_size;
 } VhostUserInflight;
 
-#if defined(_WIN32)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
 # define VU_PACKED __attribute__((gcc_struct, packed))
 #else
 # define VU_PACKED __attribute__((packed))
index 296b2fd57279e576e933a9e785be1dabfb10de8c..09fc44cca45450d7e928dfdd81b63402c7479389 100644 (file)
@@ -28,7 +28,7 @@
 
 #define QEMU_SENTINEL __attribute__((sentinel))
 
-#if defined(_WIN32)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
 # define QEMU_PACKED __attribute__((gcc_struct, packed))
 #else
 # define QEMU_PACKED __attribute__((packed))
index e485cdccae8e1901e9fffe0a70620eb45ab9cf78..c6bbc05ba3eada172a1370372eeb4a5c309ee5d9 100644 (file)
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #define QEMU_SENTINEL __attribute__((sentinel))
-#define QEMU_PACKED __attribute__((gcc_struct, packed))
+
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
+# define QEMU_PACKED __attribute__((gcc_struct, packed))
+#else
+# define QEMU_PACKED __attribute__((packed))
+#endif
 
 #define cat(x,y) x ## y
 #define cat2(x,y) cat(x,y)