From: Ali Alnubani Date: Wed, 11 Dec 2019 18:25:59 +0000 (+0000) Subject: eal/linux: fix build when VFIO is disabled X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e8a17faa5ebc7067473b4948805753251dc0c2e9;p=dpdk.git eal/linux: fix build when VFIO is disabled The header linux/version.h isn't included when CONFIG_RTE_EAL_VFIO is explicitly disabled. LINUX_VERSION_CODE and KERNEL_VERSION are therefore undefined, causing the build failure: lib/librte_eal/linux/eal/eal.c: In function ‘rte_eal_init’: lib/librte_eal/linux/eal/eal.c:1076:32: error: "LINUX_VERSION_CODE" is not defined, evaluates to 0 [-Werror=undef] Fixes: a0dede62a537 ("eal/linux: remove KNI restriction on IOVA") Cc: stable@dpdk.org Signed-off-by: Ali Alnubani --- diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index c4233ec3c8..9530ee55f8 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -25,6 +25,7 @@ #if defined(RTE_ARCH_X86) #include #endif +#include #include #include