From 6d3a4cd2a4f7a8268cdbb39be9f554f267d06fab Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 8 May 2017 20:12:19 -0700 Subject: [PATCH] vhost: define VIRTIO_F_VERSION_1 if it is missing Older kernel headers don't have the definition of this macro, so define it if necessary. This is the same workaround as used in rte_vhost/vhost.h. Change-Id: I01e0661db05de517adf8e24a47c63d32853cd385 Signed-off-by: Daniel Verkamp --- lib/vhost/vhost.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index 6bc3a8516..e763b7177 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -64,6 +64,11 @@ static char dev_dirname[PATH_MAX] = ""; #define SPDK_CACHE_LINE_SIZE RTE_CACHE_LINE_SIZE #define MAX_VHOST_DEVICE 1024 + +#ifndef VIRTIO_F_VERSION_1 +#define VIRTIO_F_VERSION_1 32 +#endif + #define VHOST_USER_F_PROTOCOL_FEATURES 30 /* Features supported by SPDK VHOST lib. */