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 <a...@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

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to