From: Michael Jeanson Date: Wed, 15 Feb 2017 20:39:34 +0000 (-0500) Subject: Don't add module symbols to global namespace X-Git-Tag: v2.0.0-pre2~118 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=409b4f07f295de7db9303600b39bca5887bebec5 Don't add module symbols to global namespace 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 --- 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