summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/udev/udev-builtin.c2
-rw-r--r--src/udev/udev.h4
-rw-r--r--src/udev/udevd.c6
4 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 68dd9df50c..7aa0f8ac04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,6 +211,7 @@ for i in $with_firmware_path; do
done
IFS=$OLD_IFS
AC_SUBST(FIRMWARE_PATH)
+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
# ------------------------------------------------------------------------------
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
index d17534e1e0..226295f686 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -34,7 +34,7 @@ static const struct udev_builtin *builtins[] = {
[UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
#endif
[UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
[UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
#endif
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
diff --git a/src/udev/udev.h b/src/udev/udev.h
index 6d3b42a30d..be79d945fb 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -140,7 +140,7 @@ enum udev_builtin_cmd {
UDEV_BUILTIN_BLKID,
#endif
UDEV_BUILTIN_BTRFS,
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
UDEV_BUILTIN_FIRMWARE,
#endif
UDEV_BUILTIN_HWDB,
@@ -166,7 +166,7 @@ struct udev_builtin {
extern const struct udev_builtin udev_builtin_blkid;
#endif
extern const struct udev_builtin udev_builtin_btrfs;
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
extern const struct udev_builtin udev_builtin_firmware;
#endif
extern const struct udev_builtin udev_builtin_hwdb;
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index da23a0d917..0fb7915b70 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -97,7 +97,7 @@ struct event {
dev_t devnum;
int ifindex;
bool is_block;
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
bool nodelay;
#endif
};
@@ -443,7 +443,7 @@ static int event_queue_insert(struct udev_device *dev)
event->devnum = udev_device_get_devnum(dev);
event->is_block = streq("block", udev_device_get_subsystem(dev));
event->ifindex = udev_device_get_ifindex(dev);
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
if (streq(udev_device_get_subsystem(dev), "firmware"))
event->nodelay = true;
#endif
@@ -526,7 +526,7 @@ static bool is_devpath_busy(struct event *event)
return true;
}
-#ifdef ENABLE_FIRMWARE
+#ifdef HAVE_FIRMWARE
/* allow to bypass the dependency tracking */
if (event->nodelay)
continue;