summaryrefslogtreecommitdiff
path: root/src/core/kmod-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-14 17:58:32 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-14 17:58:32 +0100
commitf84f9974d827314c8ee86f65a5007ccee210422b (patch)
tree0d2683390b168962cd1c071d4f9c33aba55fc5c7 /src/core/kmod-setup.c
parent264b8070715d2d19344c4991ace21147d998f56d (diff)
kmod: move #ifdef checks for kmod-setup out of main.c into kmod-setup.c
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;
}