[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/25] contrib/vhost-user-blk: fix the compilation is
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 16/25] contrib/vhost-user-blk: fix the compilation issue |
Date: |
Mon, 4 Feb 2019 09:43:50 -0500 |
From: Changpeng Liu <address@hidden>
Signed-off-by: Changpeng Liu <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
contrib/vhost-user-blk/vhost-user-blk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c
b/contrib/vhost-user-blk/vhost-user-blk.c
index 858221ad95..49640dfdf2 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -20,6 +20,10 @@
#include "contrib/libvhost-user/libvhost-user-glib.h"
#include "contrib/libvhost-user/libvhost-user.h"
+#if defined(__linux__)
+#include <linux/fs.h>
+#include <sys/ioctl.h>
+#endif
struct virtio_blk_inhdr {
unsigned char status;
@@ -454,7 +458,7 @@ vub_get_blocksize(int fd)
#if defined(__linux__) && defined(BLKSSZGET)
if (ioctl(fd, BLKSSZGET, &blocksize) == 0) {
- return blocklen;
+ return blocksize;
}
#endif
--
MST
- Re: [Qemu-devel] [PULL 23/25] mmap-alloc: fix hugetlbfs misaligned length in ppc64, (continued)
- [Qemu-devel] [PULL 25/25] contrib/libvhost-user: cleanup casts, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 20/25] fw_cfg: fix the life cycle and the name of "qemu_extra_params_fw", Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 24/25] r2d: fix build on mingw, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 06/25] vhost-net-user: add stubs for when no virtio-net device is present, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 22/25] mmap-alloc: unfold qemu_ram_mmap(), Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 17/25] vhost-user-blk: add discard/write zeroes features support, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 18/25] hw/virtio: Use CONFIG_VIRTIO_PCI switch instead of CONFIG_PCI, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 19/25] acpi: Make TPM 2.0 with TIS available as MSFT0101, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 16/25] contrib/vhost-user-blk: fix the compilation issue,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 14/25] i386/kvm: ignore masked irqs when update msi routes, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 07/25] vhost: restrict Linux dependency to kernel vhost, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 11/25] intel_iommu: fix operator in vtd_switch_address_space, Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 08/25] vhost-net: compile it on all targets that have virtio-net., Michael S. Tsirkin, 2019/02/04
- [Qemu-devel] [PULL 15/25] contrib: compile vhost-user-blk tool by default, Michael S. Tsirkin, 2019/02/04