diff options
Diffstat (limited to 'src/watchdog.c')
-rw-r--r-- | src/watchdog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/watchdog.c b/src/watchdog.c index 92144ba0..1aa9a51e 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -23,19 +23,26 @@ #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; } |