[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/26] block: Workaround for older versions of MinGW
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 05/26] block: Workaround for older versions of MinGW gcc |
Date: |
Wed, 14 Nov 2012 19:47:06 +0100 |
From: Stefan Weil <address@hidden>
Versions before gcc-4.6 don't support unnamed fields in initializers
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676).
Offset and OffsetHigh belong to an unnamed struct which is part of an
unnamed union. Therefore the original code does not work with older
versions of gcc.
Signed-off-by: Stefan Weil <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/win32-aio.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/win32-aio.c b/block/win32-aio.c
index c34dc73..92f25a9 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -167,11 +167,11 @@ BlockDriverAIOCB *win32_aio_submit(BlockDriverState *bs,
waiocb->is_linear = true;
}
- waiocb->ov = (OVERLAPPED) {
- .Offset = (DWORD) offset,
- .OffsetHigh = (DWORD) (offset >> 32),
- .hEvent = event_notifier_get_handle(&aio->e)
- };
+ memset(&waiocb->ov, 0, sizeof(waiocb->ov));
+ waiocb->ov.Offset = (DWORD)offset;
+ waiocb->ov.OffsetHigh = (DWORD)(offset >> 32);
+ waiocb->ov.hEvent = event_notifier_get_handle(&aio->e);
+
aio->count++;
if (type & QEMU_AIO_READ) {
--
1.7.6.5
- [Qemu-devel] [PULL 00/26] Block patches, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 01/26] qemu: Document GlusterFS block driver usage, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 02/26] qcow2: Fix refcount table size calculation, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 03/26] qemu-iotests: qcow2: Test growing large refcount table, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 04/26] MAINTAINERS: add Stefan Hajnoczi as block and virtio-blk co-maintainer, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 05/26] block: Workaround for older versions of MinGW gcc,
Kevin Wolf <=
- [Qemu-devel] [PATCH 06/26] tests: allow qemu-iotests to be run against nbd backend, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 07/26] aio: switch aiocb_size type int -> size_t, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 08/26] aio: use g_slice_alloc() for AIOCB pooling, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 10/26] fdc: Remove status0 parameter from fdctrl_set_fifo(), Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 09/26] aio: rename AIOPool to AIOCBInfo, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 12/26] fdc-test: insert media before fuzzing registers, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 13/26] fdc-test: add tests for non-DMA READ command, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 14/26] fdc: use status0 field instead of a local variable, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 18/26] fdc-test: Check READ ID, Kevin Wolf, 2012/11/14
- [Qemu-devel] [PATCH 17/26] fdc: fix false FD_SR0_SEEK, Kevin Wolf, 2012/11/14