qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: hch@lst.de
Subject: [Qemu-devel] [PATCH] block: Fix build
Date: Fri, 28 Aug 2009 11:50:30 -0300	[thread overview]
Message-ID: <20090828115030.19a2aa22@doriath> (raw)


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 <lcapitulino@redhat.com>
---
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 *bs,
     if (s->aligned_buf) {
         if (!qiov_is_aligned(qiov)) {
             type |= QEMU_AIO_MISALIGNED;
-        } else if (s->use_aio) {
+        }
+#ifdef CONFIG_LINUX_AIO
+        else if (s->use_aio) {
             return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov,
 	                       nb_sectors, cb, opaque, type);
         }
+#endif
     }
 
     return paio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors,

             reply	other threads:[~2009-08-28 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 14:50 Luiz Capitulino [this message]
2009-08-28 14:58 ` [Qemu-devel] Re: [PATCH] block: Fix build Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090828115030.19a2aa22@doriath \
    --to=lcapitulino@redhat.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).