aboutsummaryrefslogtreecommitdiffstats
path: root/src/main-afb-daemon.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-02-19 09:13:26 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-03-22 12:21:54 +0100
commitba693048ce1a2b629bfed11fceacabe7edc18a78 (patch)
tree7cad463bf3186fbe7a70ebf1fcbb740681ff9011 /src/main-afb-daemon.c
parent8538d642f01c8ee185cb356eba2c2f19cf4cea58 (diff)
Allow to remove systemd library
This change allows to compile a binder that doesn't use libsystemd. The restriction implied is that the neither the systemd event loop nor the systemd dbus facilities are availables. Consequently, the dbus transparancy of APIs isn't available. Also the work isn't fully complete because afb-ws-client doesn't handle the removal of libsystemd. A more general work still have to be made to allow the binder to run as library using an external event loop. Change-Id: I27a80862868b9c5a0453011a1d8aa3ce75cb5f6e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/main-afb-daemon.c')
-rw-r--r--src/main-afb-daemon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main-afb-daemon.c b/src/main-afb-daemon.c
index d825d803..705c69f9 100644
--- a/src/main-afb-daemon.c
+++ b/src/main-afb-daemon.c
@@ -36,7 +36,9 @@
#include <json-c/json.h>
-#include <systemd/sd-daemon.h>
+#if WITH_SYSTEMD
+# include <systemd/sd-daemon.h>
+#endif
#include "afb-args.h"
#include "afb-hswitch.h"
@@ -885,7 +887,9 @@ static void start(int signum, void *arg)
goto error;
/* ready */
+#if WITH_SYSTEMD
sd_notify(1, "READY=1");
+#endif
/* activate the watchdog */
#if HAS_WATCHDOG