From 93a473eff63f8d61a7c3bfa41486d994d055b9f5 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 16 Nov 2022 19:18:55 +0200 Subject: [PATCH] bluez5: prevent unloading spa-bluez5.so GObject is not compatible with unloading shared libraries using it, so add linker flags preventing that. --- spa/plugins/bluez5/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spa/plugins/bluez5/meson.build b/spa/plugins/bluez5/meson.build index 8db9b2e37..f1895701a 100644 --- a/spa/plugins/bluez5/meson.build +++ b/spa/plugins/bluez5/meson.build @@ -73,10 +73,14 @@ if get_option('bluez5-backend-hsphfpd').allowed() bluez5_sources += ['backend-hsphfpd.c'] endif +# The library uses GObject, and cannot be unloaded +bluez5_link_args = [ '-Wl,-z', '-Wl,nodelete' ] + bluez5lib = shared_library('spa-bluez5', bluez5_sources, include_directories : [ configinc ], dependencies : [ spa_dep, bluez5_deps ], + link_args : bluez5_link_args, install : true, install_dir : spa_plugindir / 'bluez5')