Merge r7362 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7622 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-04 02:59:42 +00:00
parent 9ad8e10cc6
commit 9806075ee2

View File

@@ -72,12 +72,12 @@ ifeq ($(OFED_FLAVOR),MOFED)
# header files use the LINUX_BACKPORT() macro without including
# <linux/compat-2.6.h>, include that header file explicitly.
OFED_KERNEL_DIR:=/usr/src/ofa_kernel/default
OFED_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null; dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms)
OFED_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null | grep -v ' '; dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms 2>/dev/null)
OFED_CFLAGS:=-I$(OFED_KERNEL_DIR)/include \
-I$(OFED_KERNEL_DIR)/include/uapi \
-include "linux/compat-2.6.h"
OFED_CFLAGS+=-DMOFED_MAJOR=$(shell echo $(OFED_VERS) | cut -f1 -d.)
OFED_CFLAGS+=-DMOFED_MINOR=$(shell echo $(OFED_VERS) | cut -f2 -d.)
OFED_CFLAGS+=-DMOFED_MAJOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\1/g')
OFED_CFLAGS+=-DMOFED_MINOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\2/g')
else
# OFED 1.5
OFED_KERNEL_DIR:=/usr/src/ofa_kernel