From c38cb76e8aa42dcdbe5dacc0da55952a84afa7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Oct 2018 16:02:55 +0200 Subject: mempool: only enable mempool use when linked to libsystemd-shared.so Mempool use is enabled or disabled based on the mempool_use_allowed symbol that is linked in. Should fix assert crashes in external programs caused by #9792. Replaces #10286. v2: - use two different source files instead of a gcc constructor (cherry picked from commit a5d8835c78112206bbf0812dd4cb471f803bfe88) --- meson.build | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 36163550b..0351ad820 100644 --- a/meson.build +++ b/meson.build @@ -1567,6 +1567,7 @@ libelogind_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libelogind_sy libelogind = shared_library( 'elogind', version : libelogind_version, + disable_mempool_c, include_directories : includes, link_args : ['-shared', '-Wl,--version-script=' + libelogind_sym_path], @@ -1673,6 +1674,7 @@ subdir('src/test') test_dlopen = executable( 'test-dlopen', test_dlopen_c, + disable_mempool_c, include_directories : includes, link_with : [libbasic], dependencies : [libdl]) @@ -1693,6 +1695,7 @@ test_dlopen = executable( # nss = shared_library( # 'nss_' + module, # 'src/nss-@0@/nss-@0@.c'.format(module), +# disable_mempool_c, # version : '2', # include_directories : includes, # # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned -- cgit v1.2.3