diff --git a/meson.build b/meson.build index 843d823e3e..274e43ba9e 100644 --- a/meson.build +++ b/meson.build @@ -2004,6 +2004,8 @@ libsystemd = shared_library( version : libsystemd_version, include_directories : libsystemd_includes, link_args : ['-shared', + # Make sure our library is never deleted from memory, so that our open logging fds don't leak on dlopen/dlclose cycles. + '-z', 'nodelete', '-Wl,--version-script=' + libsystemd_sym_path], link_with : [libbasic, libbasic_gcrypt,