core: Make libmount optional

Instead of skipping libcore entirely when libmount is not available,
let's only compile out the pieces that need libmount. This makes the
meson logic much less complex and allows systemd-analyze to be built
when libmount is not available.
This commit is contained in:
Daan De Meyer
2025-11-24 16:23:10 +01:00
parent 9c2cd09420
commit 5df44d0f6a
4 changed files with 47 additions and 31 deletions
+9
View File
@@ -70,6 +70,15 @@ int libmount_parse_fstab(struct libmnt_table **ret_table, struct libmnt_iter **r
int libmount_is_leaf(
struct libmnt_table *table,
struct libmnt_fs *fs);
#else
struct libmnt_monitor;
static inline void *sym_mnt_unref_monitor(struct libmnt_monitor *p) {
assert(p == NULL);
return NULL;
}
#endif
int dlopen_libmount(void);