The header struct VdiHeader is an on-disk structure for the image
format, and as such should be packed.

Signed-off-by: Jeff Cody <jc...@redhat.com>
---
 block/vdi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/vdi.c b/block/vdi.c
index dcbc27c..f8bdc92 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -140,7 +140,7 @@ static inline void uuid_unparse(const uuid_t uu, char *out)
 }
 #endif
 
-typedef struct {
+typedef struct QEMU_PACKED {
     char text[0x40];
     uint32_t signature;
     uint32_t version;
-- 
1.8.3.1


Reply via email to