mirror of https://gitee.com/openkylin/qemu.git
block: Workaround for older versions of MinGW gcc
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 <sw@weilnetz.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
54d01a0073
commit
cee40d2d2d
|
@ -167,11 +167,11 @@ BlockDriverAIOCB *win32_aio_submit(BlockDriverState *bs,
|
||||||
waiocb->is_linear = true;
|
waiocb->is_linear = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
waiocb->ov = (OVERLAPPED) {
|
memset(&waiocb->ov, 0, sizeof(waiocb->ov));
|
||||||
.Offset = (DWORD) offset,
|
waiocb->ov.Offset = (DWORD)offset;
|
||||||
.OffsetHigh = (DWORD) (offset >> 32),
|
waiocb->ov.OffsetHigh = (DWORD)(offset >> 32);
|
||||||
.hEvent = event_notifier_get_handle(&aio->e)
|
waiocb->ov.hEvent = event_notifier_get_handle(&aio->e);
|
||||||
};
|
|
||||||
aio->count++;
|
aio->count++;
|
||||||
|
|
||||||
if (type & QEMU_AIO_READ) {
|
if (type & QEMU_AIO_READ) {
|
||||||
|
|
Loading…
Reference in New Issue