[dm-devel] [PATCH v4 04/12] libmultipath: always set _GNU_SOURCE

mwilck at suse.com mwilck at suse.com
Tue Aug 30 19:27:05 UTC 2022


From: Martin Wilck <mwilck at suse.com>

... not only if dm_task_no_flush is available. Also, look for
includes under libmultipath but not under libmpathpersist.

Signed-off-by: Martin Wilck <mwilck at suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins at redhat.com>
---
 libmultipath/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index 01c7d26..6e87a16 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -8,7 +8,7 @@ DEVLIB = libmultipath.so
 LIBS = $(DEVLIB).$(SONAME)
 VERSION_SCRIPT := libmultipath.version
 
-CPPFLAGS += -I$(mpathcmddir) -I$(nvmedir)
+CPPFLAGS += -I$(mpathcmddir) -I$(nvmedir) -D_GNU_SOURCE
 CFLAGS += $(LIB_CFLAGS)
 
 LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd -lurcu -laio
@@ -23,7 +23,7 @@ ifdef SYSTEMD
 endif
 
 ifneq ($(call check_func,dm_task_no_flush,$(DEVMAPPER_INCDIR)/libdevmapper.h),0)
-	CPPFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE
+	CPPFLAGS += -DLIBDM_API_FLUSH
 endif
 
 ifneq ($(call check_func,dm_task_get_errno,$(DEVMAPPER_INCDIR)/libdevmapper.h),0)
-- 
2.37.1



More information about the dm-devel mailing list