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
This commit is contained in:
@@ -78,6 +78,8 @@ bool mempool_enabled(void) {
|
||||
if (!is_main_thread())
|
||||
return false;
|
||||
|
||||
if (!mempool_use_allowed)
|
||||
b = false;
|
||||
if (b < 0)
|
||||
b = getenv_bool("SYSTEMD_MEMPOOL") != 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user