Allow to remove systemd library
[src/app-framework-binder.git] / src / main-afb-daemon.c
index d825d80..705c69f 100644 (file)
@@ -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