[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/25] block/iscsi: Restrict Linux-specific code
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 04/25] block/iscsi: Restrict Linux-specific code |
Date: |
Sat, 9 Mar 2019 08:47:57 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Some Linux specific code is missing guards, leading to
build failure on OSX:
$ sudo brew install libiscsi
$ ./configure && make
[...]
CC block/iscsi.o
qemu/block/iscsi.c:338:24: error: 'iscsi_aiocb_info' defined but not used
[-Werror=unused-const-variable=]
static const AIOCBInfo iscsi_aiocb_info = {
^~~~~~~~~~~~~~~~
qemu/block/iscsi.c:168:1: error: 'iscsi_schedule_bh' defined but not used
[-Werror=unused-function]
iscsi_schedule_bh(IscsiAIOCB *acb)
^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Add guards to restrict this code for Linux.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
block/iscsi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index a0c0084..f31c612 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -145,6 +145,8 @@ static const unsigned iscsi_retry_times[] = {8, 32, 128,
512, 2048, 8192, 32768}
* unallocated. */
#define ISCSI_CHECKALLOC_THRES 64
+#ifdef __linux__
+
static void
iscsi_bh_cb(void *p)
{
@@ -172,6 +174,8 @@ iscsi_schedule_bh(IscsiAIOCB *acb)
qemu_bh_schedule(acb->bh);
}
+#endif
+
static void iscsi_co_generic_bh_cb(void *opaque)
{
struct IscsiTask *iTask = opaque;
@@ -290,6 +294,8 @@ static void iscsi_co_init_iscsitask(IscsiLun *iscsilun,
struct IscsiTask *iTask)
};
}
+#ifdef __linux__
+
/* Called (via iscsi_service) with QemuMutex held. */
static void
iscsi_abort_task_cb(struct iscsi_context *iscsi, int status, void
*command_data,
@@ -338,6 +344,7 @@ static const AIOCBInfo iscsi_aiocb_info = {
.cancel_async = iscsi_aio_cancel,
};
+#endif
static void iscsi_process_read(void *arg);
static void iscsi_process_write(void *arg);
--
1.8.3.1
- [Qemu-devel] [PULL 00/25] Misc patches for QEMU 4.0 soft freeze, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 01/25] memory: Do not update coalesced IO range in the case of NOP, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 03/25] hw/i386/pc: run the multiboot loader before the PVH loader, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 02/25] vfio-pci: enable by default, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 04/25] block/iscsi: Restrict Linux-specific code,
Paolo Bonzini <=
- [Qemu-devel] [PULL 08/25] i386: extended the cpuid_level when Intel PT is enabled, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 07/25] target-i386: add kvm stubs to user-mode emulators, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 14/25] build: remove unnecessary assignments from Makefile.target, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 12/25] update copyright notice, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 19/25] scsi-disk: Fix crash if request is invaild or disk is no medium, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 11/25] lsi: check if SIGP bit is already set in Wait reselect, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 20/25] lsi: use ldn_le_p()/stn_le_p(), Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 17/25] oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 16/25] accel: Allow to build QEMU without TCG or KVM support, Paolo Bonzini, 2019/03/09
- [Qemu-devel] [PULL 24/25] lsi: return dfifo value, Paolo Bonzini, 2019/03/09