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>
#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)
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)
{