diff --git a/src/repart/meson.build b/src/repart/meson.build index 1478ae278a..b922ecb713 100644 --- a/src/repart/meson.build +++ b/src/repart/meson.build @@ -16,6 +16,7 @@ executables += [ 'dependencies' : [ libblkid_cflags, libfdisk, + libmount_cflags, libopenssl, threads, ], @@ -35,6 +36,7 @@ executables += [ 'dependencies' : [ libblkid_cflags, libfdisk, + libmount_cflags, libopenssl, threads, ], diff --git a/src/repart/repart.c b/src/repart/repart.c index ea44775eec..497654d012 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -50,6 +50,7 @@ #include "initrd-util.h" #include "io-util.h" #include "json-util.h" +#include "libmount-util.h" #include "list.h" #include "loop-util.h" #include "main-func.h" @@ -6616,6 +6617,8 @@ static int partition_populate_filesystem(Context *context, Partition *p, const c * appear in the host namespace. Hence we fork a child that has its own file system namespace and * detached mount propagation. */ + (void) dlopen_libmount(); + r = safe_fork("(sd-copy)", FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_WAIT|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL); if (r < 0) return r;