[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] block: Fix build

From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH] block: Fix build
Date: Fri, 28 Aug 2009 11:50:30 -0300

Current build is broken because laio_submit() is only available if
the host has Linux AIO support, otherwise we will get the following
build error:
block/raw-posix.o: In function `raw_aio_submit':
qemu-qmp/block/raw-posix.c:546: undefined reference to `laio_submit'
collect2: ld returned 1 exit status

Signed-off-by: Luiz Capitulino <address@hidden>
PS: Hope this is right, only compiled tested.

diff --git a/block/raw-posix.c b/block/raw-posix.c
index 8a7dc15..b5f03d6 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -542,10 +542,13 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState 
     if (s->aligned_buf) {
         if (!qiov_is_aligned(qiov)) {
             type |= QEMU_AIO_MISALIGNED;
-        } else if (s->use_aio) {
+        }
+        else if (s->use_aio) {
             return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov,
                               nb_sectors, cb, opaque, type);
     return paio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]