summaryrefslogtreecommitdiffstats
path: root/src/utils-systemd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils-systemd.c')
-rw-r--r--src/utils-systemd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/utils-systemd.c b/src/utils-systemd.c
index b8c3c0b..d804144 100644
--- a/src/utils-systemd.c
+++ b/src/utils-systemd.c
@@ -27,8 +27,15 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <systemd/sd-bus.h>
-#include <systemd/sd-bus-protocol.h>
+#ifndef NO_LIBSYSTEMD
+# include <systemd/sd-bus.h>
+# include <systemd/sd-bus-protocol.h>
+#else
+ struct sd_bus;
+# define sd_bus_default_user(p) ((*(p)=NULL),(-ENOTSUP))
+# define sd_bus_default_system(p) ((*(p)=NULL),(-ENOTSUP))
+# define sd_bus_call_method(...) (-ENOTSUP)
+#endif
#include "utils-systemd.h"