fix: visibility of bt_plugin_python_create_all_from_file
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 30 Mar 2023 18:07:05 +0000 (14:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 30 Mar 2023 19:35:43 +0000 (15:35 -0400)
With glib2 < 2.52, G_MODULE_EXPORT is defined to nothing on platforms
other than Windows instead of __attribute__((visibility("default")))
which results in an hidden symbol and the failure to load the python
plugin provider.

Use our own macro to export this symbol.

Change-Id: I83ac515c573d92e22021759bf23a1a9615bd3e07
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9724
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/python-plugin-provider/python-plugin-provider.c

index e6e31099713393acfb35e864529ad581bd0a7193..142914a2d13d96ebd6b3203f5ff5080b22ac4c49 100644 (file)
@@ -24,7 +24,6 @@
 #include <signal.h>
 #include <Python.h>
 #include <glib.h>
-#include <gmodule.h>
 
 #define PYTHON_PLUGIN_FILE_PREFIX      "bt_plugin_"
 #define PYTHON_PLUGIN_FILE_PREFIX_LEN  (sizeof(PYTHON_PLUGIN_FILE_PREFIX) - 1)
@@ -596,7 +595,7 @@ end:
        return status;
 }
 
-G_MODULE_EXPORT
+BT_EXPORT
 int bt_plugin_python_create_all_from_file(const char *path,
                bool fail_on_load_error, struct bt_plugin_set **plugin_set_out)
 {
This page took 0.025159 seconds and 4 git commands to generate.