diff options
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/Makefile.am | 6 | ||||
-rw-r--r-- | src/udev/udev-builtin.c | 2 | ||||
-rw-r--r-- | src/udev/udev.h | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index 866d2c2537..038803454f 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -46,7 +46,6 @@ libudev_core_la_SOURCES = \ udev-rules.c \ udev-ctrl.c \ udev-builtin.c \ - udev-builtin-blkid.c \ udev-builtin-btrfs.c \ udev-builtin-firmware.c \ udev-builtin-hwdb.c \ @@ -75,6 +74,11 @@ libudev_core_la_LIBADD = \ $(BLKID_LIBS) \ $(SELINUX_LIBS) +if HAVE_BLKID +libudev_core_la_SOURCES += \ + udev-builtin-blkid.c +endif + if HAVE_MODULES libudev_core_la_SOURCES += \ udev-builtin-kmod.c diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index d53663f0a4..b9dbe87dcc 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -30,7 +30,9 @@ static bool initialized; static const struct udev_builtin *builtins[] = { +#ifdef HAVE_BLKID [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, +#endif [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, diff --git a/src/udev/udev.h b/src/udev/udev.h index c8ee2feede..682e03721f 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -136,7 +136,9 @@ int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg); /* built-in commands */ enum udev_builtin_cmd { +#ifdef HAVE_BLKID UDEV_BUILTIN_BLKID, +#endif UDEV_BUILTIN_BTRFS, UDEV_BUILTIN_FIRMWARE, UDEV_BUILTIN_HWDB, @@ -158,7 +160,9 @@ struct udev_builtin { bool (*validate)(struct udev *udev); bool run_once; }; +#ifdef HAVE_BLKID extern const struct udev_builtin udev_builtin_blkid; +#endif extern const struct udev_builtin udev_builtin_btrfs; extern const struct udev_builtin udev_builtin_firmware; extern const struct udev_builtin udev_builtin_hwdb; |