summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-11-20 01:24:32 +0100
committerTom Gundersen <teg@jklm.no>2012-11-20 19:35:27 +0100
commite30431623a7d871da123cc37055ac49abf2c20ea (patch)
treeb07f9dcec833b65964e3b07b2907a73ebbd03184 /src
parent1d0b59f932d96c108ad5e921213723a48e6b47b8 (diff)
build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel, so make the dependency optional.
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c4
-rw-r--r--src/udev/udev-builtin.c2
-rw-r--r--src/udev/udev.h4
3 files changed, 10 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 4da8ecb864..2fcd63d3e2 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -55,7 +55,9 @@
#include "mount-setup.h"
#include "loopback-setup.h"
+#ifdef HAVE_KMOD
#include "kmod-setup.h"
+#endif
#include "hostname-setup.h"
#include "machine-id-setup.h"
#include "locale-setup.h"
@@ -1574,7 +1576,9 @@ int main(int argc, char *argv[]) {
if (arg_show_status || plymouth_running())
status_welcome();
+#ifdef HAVE_KMOD
kmod_setup();
+#endif
hostname_setup();
machine_id_setup();
loopback_setup();
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
index 26d65edd47..32e6e1e90c 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -37,7 +37,9 @@ static const struct udev_builtin *builtins[] = {
[UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
+#ifdef HAVE_KMOD
[UDEV_BUILTIN_KMOD] = &udev_builtin_kmod,
+#endif
[UDEV_BUILTIN_NET_ID] = &udev_builtin_net_id,
[UDEV_BUILTIN_PATH_ID] = &udev_builtin_path_id,
[UDEV_BUILTIN_USB_ID] = &udev_builtin_usb_id,
diff --git a/src/udev/udev.h b/src/udev/udev.h
index 63de30c02d..32779ba486 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -141,7 +141,9 @@ enum udev_builtin_cmd {
UDEV_BUILTIN_FIRMWARE,
UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID,
+#ifdef HAVE_KMOD
UDEV_BUILTIN_KMOD,
+#endif
UDEV_BUILTIN_NET_ID,
UDEV_BUILTIN_PATH_ID,
UDEV_BUILTIN_USB_ID,
@@ -166,7 +168,9 @@ extern const struct udev_builtin udev_builtin_btrfs;
extern const struct udev_builtin udev_builtin_firmware;
extern const struct udev_builtin udev_builtin_hwdb;
extern const struct udev_builtin udev_builtin_input_id;
+#ifdef HAVE_KMOD
extern const struct udev_builtin udev_builtin_kmod;
+#endif
extern const struct udev_builtin udev_builtin_net_id;
extern const struct udev_builtin udev_builtin_path_id;
extern const struct udev_builtin udev_builtin_usb_id;