From: Alexander Guy Date: Thu, 23 Oct 2014 23:39:32 +0000 (-0700) Subject: kni: fix build on Ubuntu-hybrids X-Git-Tag: spdx-start~10223 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e20d2548820eda0611e7c33d6a6cd9f769cf7fa3;p=dpdk.git kni: fix build on Ubuntu-hybrids In the case where a userspace reports itself as Ubuntu, but the kernel isn't providing the expected version signature interface, turn off Ubuntu specializations. This situation happens often enough in development environments, and with multi-distribution build servers (e.g. chroot, containers). Signed-off-by: Alexander Guy Acked-by: Thomas Monjalon --- diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index e0218e72d6..fb673d9336 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -44,7 +44,7 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror -ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) +ifeq ($(shell test -f /proc/version_signature && lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) UBUNTU_KERNEL_CODE := $(shell cut -d' ' -f2 /proc/version_signature | \ cut -d'~' -f1 | cut -d- -f1,2 | tr .- $(comma))