From: Luca Boccassi Date: Fri, 5 Dec 2025 11:58:34 +0000 (+0000) Subject: pid1: do not fail if dlopen of libmount fails because it is not compiled in X-Git-Tag: v259-rc3~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdb9ad1a4465a8c973fe85474a6b55194b4b1299;p=thirdparty%2Fsystemd.git pid1: do not fail if dlopen of libmount fails because it is not compiled in It is now possible to build and run without libmount. But if support is compiled in, then we need to be able to load it. Hence gracefully skip it when support is not compiled in, but fail otherwise. --- diff --git a/src/core/main.c b/src/core/main.c index f4acdb02c6c..cab8e009411 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -3311,8 +3311,9 @@ int main(int argc, char *argv[]) { goto finish; } + /* Building without libmount is allowed, but if it is compiled in, then we must be able to load it */ r = dlopen_libmount(); - if (r < 0) { + if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r)) { error_message = "Failed to load libmount.so"; goto finish; }