summaryrefslogtreecommitdiff
path: root/src/core/kmod-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/kmod-setup.c')
-rw-r--r--src/core/kmod-setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index 8136d3c0f8..23df1fdf36 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -23,13 +23,17 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+
+#ifdef HAVE_KMOD
#include <libkmod.h>
+#endif
#include "macro.h"
#include "execute.h"
#include "capability.h"
#include "kmod-setup.h"
+#ifdef HAVE_KMOD
static void systemd_kmod_log(
void *data,
int priority,
@@ -52,8 +56,10 @@ static bool cmdline_check_kdbus(void) {
return strstr(line, "kdbus") != NULL;
}
+#endif
int kmod_setup(void) {
+#ifdef HAVE_KMOD
static const struct {
const char *module;
@@ -123,5 +129,6 @@ int kmod_setup(void) {
if (ctx)
kmod_unref(ctx);
+#endif
return 0;
}