summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-10-09 16:02:55 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:31 +0100
commitc38cb76e8aa42dcdbe5dacc0da55952a84afa7a6 (patch)
tree35bf6c86b53462c722e64104062ceec64eff3e73 /meson.build
parentf02a0332640a57eefab440123b57ab1b3c8cd0d6 (diff)
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)
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build3
1 files changed, 3 insertions, 0 deletions
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