Don't add module symbols to global namespace
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 15 Feb 2017 20:39:34 +0000 (15:39 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Jun 2017 15:51:01 +0000 (11:51 -0400)
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 <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/plugin/plugin-so.c

index 44aa967ed603b18820456e263468004178c319c1..f8fb4df8d4d688f1790f01ad4ec862c707cd768d 100644 (file)
@@ -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
This page took 0.025471 seconds and 4 git commands to generate.