This patch fixes linker errors when building QEMU without Linux AIO support.
It is based on suggestions from malc and Kevin Wolf.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
int fd_got_error;
int fd_media_changed;
#endif
+#ifdef CONFIG_LINUX_AIO
int use_aio;
+#endif
uint8_t* aligned_buf;
} BDRVRawState;
if (!s->aio_ctx) {
goto out_free_buf;
}
+#ifdef CONFIG_LINUX_AIO
s->use_aio = 0;
+#endif
}
return 0;
if (s->aligned_buf) {
if (!qiov_is_aligned(qiov)) {
type |= QEMU_AIO_MISALIGNED;
+#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);
+ nb_sectors, cb, opaque, type);
+#endif
}
}