From 5eef3669fc4aedeb2046d2177833677ce290679c Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 30 Mar 2023 14:07:05 -0400 Subject: [PATCH] fix: visibility of bt_plugin_python_create_all_from_file 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 Reviewed-on: https://review.lttng.org/c/babeltrace/+/9724 Reviewed-by: Simon Marchi --- src/python-plugin-provider/python-plugin-provider.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python-plugin-provider/python-plugin-provider.c b/src/python-plugin-provider/python-plugin-provider.c index e6e31099..142914a2 100644 --- a/src/python-plugin-provider/python-plugin-provider.c +++ b/src/python-plugin-provider/python-plugin-provider.c @@ -24,7 +24,6 @@ #include #include #include -#include #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) { -- 2.34.1