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: 6a4e6fab40 ('merge: branch 'systemd' into jv/systemd-merge')
This commit is contained in:
Beniamino Galvani
2025-06-18 10:37:49 +02:00
parent 77c99b61c0
commit 9f510533f1

View File

@@ -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 */