From 409b4f07f295de7db9303600b39bca5887bebec5 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 15 Feb 2017 15:39:34 -0500 Subject: [PATCH] Don't add module symbols to global namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The G_MODULE_BIND_LOCAL flag specifies that symbols in the module should not be added to the global name space. The default action on most platforms is to place symbols in the module in the global name space, which may cause conflicts with existing symbols. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- lib/plugin/plugin-so.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugin/plugin-so.c b/lib/plugin/plugin-so.c index 44aa967e..f8fb4df8 100644 --- a/lib/plugin/plugin-so.c +++ b/lib/plugin/plugin-so.c @@ -197,7 +197,7 @@ struct bt_plugin_so_shared_lib_handle *bt_plugin_so_shared_lib_handle_create( goto error; } - shared_lib_handle->module = g_module_open(path, 0); + shared_lib_handle->module = g_module_open(path, G_MODULE_BIND_LOCAL); if (!shared_lib_handle->module) { /* * DEBUG-level logging because we're only _trying_ to -- 2.34.1