Allow to remove systemd library
[src/app-framework-binder.git] / src / watchdog.c
index 92144ba..1aa9a51 100644 (file)
 
 #include <stdlib.h>
 
+#include "jobs.h"
+
+#if WITH_SYSTEMD
+
 #include <systemd/sd-event.h>
 #include <systemd/sd-daemon.h>
 
-#include "jobs.h"
 #include "systemd.h"
 
+#endif
+
 int watchdog_activate()
 {
+#if WITH_SYSTEMD
        /* set the watchdog */
        if (sd_watchdog_enabled(0, NULL)) {
                jobs_acquire_event_manager();
                sd_event_set_watchdog(systemd_get_event_loop(), 1);
        }
+#endif
        return 0;
 }