Skip to contentSkip to conversation

multipathd: fix build without systemd

PATCH New Michael Lass 1 participant 1 message Sep 20, 2017 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipathd: fix build without systemd

do_sd_notify contains a call to sd_notify which is unknown if USE_SYSTEMD is undefined. In this case, do_sd_notify is never called anyway, so embed the entire function into an #ifdef USE_SYSTEMD.

This fixes a regression introduced in 88ddca5.

---
 multipathd/main.c | 2 ++
 1 file changed, 2 insertions(+)
multipathd/main.c +2 -0
index 8049da22..bbe14771 100644
@@ -169,6 +169,7 @@ sd_notify_status(void)
 	return NULL;
 }
 
+#ifdef USE_SYSTEMD
 static void do_sd_notify(enum daemon_status old_state)
 {
 	/*
@@ -181,6 +182,7 @@ static void do_sd_notify(enum daemon_status old_state)
 		return;
 	sd_notify(0, sd_notify_status());
 }
+#endif
 
 static void config_cleanup(void *arg)
 {
Signature · 1 line
2.14.1