]> sourceware.org Git - lvm2.git/commitdiff
Revert "lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT"
authorDavid Teigland <teigland@redhat.com>
Mon, 16 Sep 2019 16:42:23 +0000 (11:42 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 16 Sep 2019 16:44:42 +0000 (11:44 -0500)
This reverts commit 71af650760c2b75b3c267277f47d8ba235421300.

It disabled sd_notify() which broke 'systemctl start lvmlockd'.

daemons/lvmlockd/Makefile.in
daemons/lvmlockd/lvmlockd-core.c

index dca05b864eaa84c2ee752b6adc23fcf6024f99f1..9c034014523c3ccae144dffd80623c3c2a99e0e6 100644 (file)
@@ -38,18 +38,25 @@ TARGETS = lvmlockd lvmlockctl
 
 include $(top_builddir)/make.tmpl
 
-CFLAGS += $(EXTRA_EXEC_CFLAGS) $(SYSTEMD_CFLAGS)
+CFLAGS += $(EXTRA_EXEC_CFLAGS)
 INCLUDES += -I$(top_srcdir)/libdaemon/server
-LDFLAGS += $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
-LIBS += $(PTHREAD_LIBS) $(SYSTEMD_LIBS)
+LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
+LIBS += $(RT_LIBS) $(DAEMON_LIBS) $(PTHREAD_LIBS)
 
-lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS)
+
+ifeq ($(USE_SD_NOTIFY),yes)
+       CFLAGS += $(shell pkg-config --cflags libsystemd) -DUSE_SD_NOTIFY
+       LIBS += $(shell pkg-config --libs libsystemd)
+endif
+
+lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
+                   $(top_builddir)/libdaemon/server/libdaemonserver.a
        @echo "    [CC] $@"
-       $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LOCK_LIBS) $(LIBS)
+       $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver $(INTERNAL_LIBS) $(LIBS)
 
-lvmlockctl: lvmlockctl.o $(INTERNAL_LIBS)
+lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a
        @echo "    [CC] $@"
-       $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
+       $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o $(INTERNAL_LIBS) $(LIBS)
 
 install_lvmlockd: lvmlockd
        @echo "    [INSTALL] $<"
index 5609ccc6f6c4f33f43a87c63f94d2cacf02a87cb..39275fb17ee87e2685acea8a20f0326d668b8257 100644 (file)
@@ -31,7 +31,7 @@
 #include <sys/utsname.h>
 #include <sys/un.h>
 
-#ifdef NOTIFYDBUS_SUPPORT
+#ifdef USE_SD_NOTIFY
 #include <systemd/sd-daemon.h>
 #endif
 
This page took 0.042217 seconds and 5 git commands to generate.