summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/meson.build6
-rw-r--r--src/udev/net/link-config.c2
-rw-r--r--src/udev/udev-builtin-blkid.c2
-rw-r--r--src/udev/udev-builtin-btrfs.c2
-rw-r--r--src/udev/udev-builtin.c6
-rw-r--r--src/udev/udev.h10
6 files changed, 14 insertions, 14 deletions
diff --git a/src/udev/meson.build b/src/udev/meson.build
index eeb341f8d1..dd24b7e9f7 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -36,15 +36,15 @@ libudev_core_sources = '''
net/ethtool-util.h
'''.split()
-if conf.get('HAVE_KMOD', false)
+if conf.get('HAVE_KMOD') == 1
libudev_core_sources += ['udev-builtin-kmod.c']
endif
-if conf.get('HAVE_BLKID', false)
+if conf.get('HAVE_BLKID') == 1
libudev_core_sources += ['udev-builtin-blkid.c']
endif
-if conf.get('HAVE_ACL', false)
+if conf.get('HAVE_ACL') == 1
libudev_core_sources += ['udev-builtin-uaccess.c',
logind_acl_c,
sd_login_c]
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 6ece1250f2..a5f3b1a1b0 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -58,7 +58,7 @@ static const char* const link_dirs[] = {
"/etc/systemd/network",
"/run/systemd/network",
"/usr/lib/systemd/network",
-#ifdef HAVE_SPLIT_USR
+#if HAVE_SPLIT_USR
"/lib/systemd/network",
#endif
NULL};
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c
index 11d7085153..4487e82693 100644
--- a/src/udev/udev-builtin-blkid.c
+++ b/src/udev/udev-builtin-blkid.c
@@ -107,7 +107,7 @@ static void print_property(struct udev_device *dev, bool test, const char *name,
static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
-#if defined(GPT_ROOT_NATIVE) && defined(ENABLE_EFI)
+#if defined(GPT_ROOT_NATIVE) && ENABLE_EFI
_cleanup_free_ char *root_id = NULL;
bool found_esp = false;
diff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c
index cfaa463804..4d59cc82a8 100644
--- a/src/udev/udev-builtin-btrfs.c
+++ b/src/udev/udev-builtin-btrfs.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <sys/ioctl.h>
-#ifdef HAVE_LINUX_BTRFS_H
+#if HAVE_LINUX_BTRFS_H
#include <linux/btrfs.h>
#endif
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
index e6b36f124f..e4dccd0b09 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -27,21 +27,21 @@
static bool initialized;
static const struct udev_builtin *builtins[] = {
-#ifdef HAVE_BLKID
+#if HAVE_BLKID
[UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
#endif
[UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
[UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
-#ifdef HAVE_KMOD
+#if HAVE_KMOD
[UDEV_BUILTIN_KMOD] = &udev_builtin_kmod,
#endif
[UDEV_BUILTIN_NET_ID] = &udev_builtin_net_id,
[UDEV_BUILTIN_NET_LINK] = &udev_builtin_net_setup_link,
[UDEV_BUILTIN_PATH_ID] = &udev_builtin_path_id,
[UDEV_BUILTIN_USB_ID] = &udev_builtin_usb_id,
-#ifdef HAVE_ACL
+#if HAVE_ACL
[UDEV_BUILTIN_UACCESS] = &udev_builtin_uaccess,
#endif
};
diff --git a/src/udev/udev.h b/src/udev/udev.h
index c0cb7eae84..2204db5a95 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -146,21 +146,21 @@ int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg);
/* built-in commands */
enum udev_builtin_cmd {
-#ifdef HAVE_BLKID
+#if HAVE_BLKID
UDEV_BUILTIN_BLKID,
#endif
UDEV_BUILTIN_BTRFS,
UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID,
UDEV_BUILTIN_KEYBOARD,
-#ifdef HAVE_KMOD
+#if HAVE_KMOD
UDEV_BUILTIN_KMOD,
#endif
UDEV_BUILTIN_NET_ID,
UDEV_BUILTIN_NET_LINK,
UDEV_BUILTIN_PATH_ID,
UDEV_BUILTIN_USB_ID,
-#ifdef HAVE_ACL
+#if HAVE_ACL
UDEV_BUILTIN_UACCESS,
#endif
UDEV_BUILTIN_MAX
@@ -174,14 +174,14 @@ struct udev_builtin {
bool (*validate)(struct udev *udev);
bool run_once;
};
-#ifdef HAVE_BLKID
+#if 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_hwdb;
extern const struct udev_builtin udev_builtin_input_id;
extern const struct udev_builtin udev_builtin_keyboard;
-#ifdef HAVE_KMOD
+#if HAVE_KMOD
extern const struct udev_builtin udev_builtin_kmod;
#endif
extern const struct udev_builtin udev_builtin_net_id;