From 9f510533f11fface4db1bc2ea27a9810c970ed8c Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 18 Jun 2025 10:37:49 +0200 Subject: [PATCH] systemd: ignore device_is_devtype() The function uses symbol sd_device_get_devtype() which is currently commented out. Therefore, NM dynamically links to the symbol from the libsystemd shared object, which breaks on machines without systemd. Before: $ nm -u build/src/core/NetworkManager | grep sd_device U sd_device_get_sysattr_value@LIBSYSTEMD_240 $ After: $ nm -u build/src/core/NetworkManager | grep sd_device $ Fixes: 6a4e6fab403b ('merge: branch 'systemd' into jv/systemd-merge') --- src/libnm-systemd-core/src/libsystemd/sd-device/device-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libnm-systemd-core/src/libsystemd/sd-device/device-util.c b/src/libnm-systemd-core/src/libsystemd/sd-device/device-util.c index 25290e630a..e289523f72 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-device/device-util.c +++ b/src/libnm-systemd-core/src/libsystemd/sd-device/device-util.c @@ -133,7 +133,6 @@ char** device_make_log_fields(sd_device *device) { return TAKE_PTR(strv); } - #endif /* NM_IGNORED */ bool device_in_subsystem(sd_device *device, const char *subsystem) { @@ -145,6 +144,7 @@ bool device_in_subsystem(sd_device *device, const char *subsystem) { return streq_ptr(s, subsystem); } +#if 0 /* NM_IGNORED */ bool device_is_devtype(sd_device *device, const char *devtype) { const char *s = NULL; @@ -153,3 +153,4 @@ bool device_is_devtype(sd_device *device, const char *devtype) { (void) sd_device_get_devtype(device, &s); return streq_ptr(s, devtype); } +#endif /* NM_IGNORED */