Skip to content
Snippets Groups Projects
Commit 4387b78a authored by Changpeng Liu's avatar Changpeng Liu Committed by Michael S. Tsirkin
Browse files

contrib/vhost-user-blk: fix the compilation issue


Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Message-Id: <1547615970-23545-2-git-send-email-changpeng.liu@intel.com>
[PMD: this patch was first (incorrectly) introduced as a56de056]
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190212140621.17009-3-philmd@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
parent 8c43812b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......@@ -521,7 +525,7 @@ vub_get_blocksize(int fd)
#if defined(__linux__) && defined(BLKSSZGET)
if (ioctl(fd, BLKSSZGET, &blocksize) == 0) {
return blocklen;
return blocksize;
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment