diff options
Diffstat (limited to 'emulators/qemu/patches/patch-ay')
-rw-r--r-- | emulators/qemu/patches/patch-ay | 105 |
1 files changed, 91 insertions, 14 deletions
diff --git a/emulators/qemu/patches/patch-ay b/emulators/qemu/patches/patch-ay index 4636f8023a5..053636d5f44 100644 --- a/emulators/qemu/patches/patch-ay +++ b/emulators/qemu/patches/patch-ay @@ -1,15 +1,92 @@ -$NetBSD: patch-ay,v 1.6 2006/12/07 16:06:39 xtraeme Exp $ +$NetBSD: patch-ay,v 1.7 2007/05/21 20:24:48 xtraeme Exp $ ---- block.c.orig 2006-12-06 21:23:19.000000000 +0100 -+++ block.c 2006-12-06 21:24:04.000000000 +0100 -@@ -29,8 +29,10 @@ - #include <sys/stat.h> - #include <sys/ioctl.h> - #include <sys/queue.h> -+#ifndef __DragonFly__ - #include <sys/disk.h> - #endif -+#endif - - #ifdef CONFIG_COCOA - #include <paths.h> +--- block-raw.c.orig 2007-02-06 00:01:54.000000000 +0100 ++++ block-raw.c +@@ -25,7 +25,9 @@ + #include "block_int.h" + #include <assert.h> + #ifndef _WIN32 ++#ifdef _POSIX_ASYNCHRONOUS_IO + #include <aio.h> ++#endif + + #ifndef QEMU_TOOL + #include "exec-all.h" +@@ -157,6 +159,7 @@ static int raw_pwrite(BlockDriverState * + return ret; + } + ++#ifdef _POSIX_ASYNCHRONOUS_IO + /***********************************************************/ + /* Unix AIO using POSIX AIO */ + +@@ -379,6 +382,7 @@ static void raw_aio_cancel(BlockDriverAI + pacb = &acb->next; + } + } ++#endif + + static void raw_close(BlockDriverState *bs) + { +@@ -469,6 +473,35 @@ static void raw_flush(BlockDriverState * + fsync(s->fd); + } + ++#ifndef _POSIX_ASYNCHRONOUS_IO ++void qemu_aio_init(void) ++{ ++} ++ ++void qemu_aio_poll(void) ++{ ++} ++ ++void qemu_aio_flush(void) ++{ ++} ++ ++void qemu_aio_wait_start(void) ++{ ++} ++ ++void qemu_aio_wait(void) ++{ ++#ifndef QEMU_TOOL ++ qemu_bh_poll(); ++#endif ++} ++ ++void qemu_aio_wait_end(void) ++{ ++} ++#endif ++ + BlockDriver bdrv_raw = { + "raw", + sizeof(BDRVRawState), +@@ -480,10 +513,12 @@ BlockDriver bdrv_raw = { + raw_create, + raw_flush, + ++#ifdef _POSIX_ASYNCHRONOUS_IO + .bdrv_aio_read = raw_aio_read, + .bdrv_aio_write = raw_aio_write, + .bdrv_aio_cancel = raw_aio_cancel, + .aiocb_size = sizeof(RawAIOCB), ++#endif + .protocol_name = "file", + .bdrv_pread = raw_pread, + .bdrv_pwrite = raw_pwrite, +@@ -816,10 +851,12 @@ BlockDriver bdrv_host_device = { + NULL, + raw_flush, + ++#ifdef _POSIX_ASYNCHRONOUS_IO + .bdrv_aio_read = raw_aio_read, + .bdrv_aio_write = raw_aio_write, + .bdrv_aio_cancel = raw_aio_cancel, + .aiocb_size = sizeof(RawAIOCB), ++#endif + .bdrv_pread = raw_pread, + .bdrv_pwrite = raw_pwrite, + .bdrv_getlength = raw_getlength, |