[PATCH 4/4] multipath-tools: allow passing non-standard linux-headers location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On NixOS nothing is installed in /usr/include and instead lives
in it's own prefix.

The change switches linux/nvme_ioctl.h discovery to user provided path.

CC: Martin Wilck <mwilck@xxxxxxxx>
CC: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
Signed-off-by: Sergei Trofimovich <slyich@xxxxxxxxx>
---
 Makefile.inc                       | 5 +++++
 libmultipath/prioritizers/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc b/Makefile.inc
index f5509db4..a7d16dfd 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -68,6 +68,11 @@ ifndef LIBUDEV_INCDIR
 	endif
 endif
 
+# Allow user to override default location.
+ifndef LINUX_HEADERS_INCDIR
+	LINUX_HEADERS_INCDIR = /usr/include
+endif
+
 prefix		=
 exec_prefix	= $(prefix)
 usr_prefix	= $(prefix)
diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile
index 8d34ae32..16c63977 100644
--- a/libmultipath/prioritizers/Makefile
+++ b/libmultipath/prioritizers/Makefile
@@ -23,7 +23,7 @@ LIBS = \
 	libpriopath_latency.so \
 	libpriosysfs.so
 
-ifneq ($(call check_file,/usr/include/linux/nvme_ioctl.h),0)
+ifneq ($(call check_file,$(LINUX_HEADERS_INCDIR)/linux/nvme_ioctl.h),0)
 	LIBS += libprioana.so
 	CFLAGS += -I../nvme
 endif
-- 
2.34.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux