summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2018-01-04 18:25:19 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2018-01-04 19:00:06 +0100
commitce4480a8934c3b459c130342e2d7eaf684b4faa5 (patch)
treeae2913b4752190c2e8b483119ca929fc67a2867e
parent7af092ad48790ac1bcbc36b0100cc2be8f57d27e (diff)
downloadNetworkManager-fg/jansson_wrap.tar.gz
fixup! fixup! core: load jansson on demandfg/jansson_wrap
-rw-r--r--libnm-core/nm-jansson.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libnm-core/nm-jansson.c b/libnm-core/nm-jansson.c
index e7087f0986..8e26e345d8 100644
--- a/libnm-core/nm-jansson.c
+++ b/libnm-core/nm-jansson.c
@@ -51,7 +51,7 @@ void *_nm_jansson_json_string_value;
#define TRY_BIND_SYMBOL(symbol) \
G_STMT_START { \
void *sym = dlsym (handle, #symbol); \
- if (_nm_jansson_ ## symbol && sym != _nm_jansson_ ## symbol) \
+ if (!sym) \
return FALSE; \
_nm_jansson_ ## symbol = sym; \
} G_STMT_END
@@ -99,11 +99,7 @@ nm_jansson_load (void)
if (G_LIKELY (state != UNKNOWN))
goto out;
- /* First just resolve the symbols to see if there's a conflict already. */
- if (!bind_symbols (RTLD_DEFAULT))
- goto out;
-
- handle = dlopen (JANSSON_SONAME, RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
+ handle = dlopen (JANSSON_SONAME, RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE | RTLD_DEEPBIND);
if (!handle)
goto out;