[Spice-devel] [PATCH spice-common] add padding member to SpiceMsgEmpty
Aric Stewart
aric at codeweavers.com
Tue Apr 17 09:32:38 PDT 2012
Empty structures are undefined in C, gcc handles them without issue
assigning a size of 0. However MSVC++ generates a hard error (C2015)
this allows messages.h to be included in c files compiled by MSVC++.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
---
common/messages.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/messages.h b/common/messages.h
index 58e8bee..106a8d3 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -52,6 +52,7 @@ typedef struct SpiceMsgData {
} SpiceMsgData;
typedef struct SpiceMsgEmpty {
+ uint8_t padding;
} SpiceMsgEmpty;
typedef struct SpiceMsgInputsInit {
--
1.6.0.rc1.64.g61192
More information about the Spice-devel
mailing list