[gnome-shell] BluetoothStatus: depend more on libgnome-bluetooth-applet
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] BluetoothStatus: depend more on libgnome-bluetooth-applet
- Date: Sun, 6 Feb 2011 11:12:42 +0000 (UTC)
commit b6749f4b606470bec455b4d0bd1f15d8667dea3c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Jan 24 18:39:45 2011 +0100
BluetoothStatus: depend more on libgnome-bluetooth-applet
Ensure that a dependency is generated even when using --as-needed,
by adding a fake function that calls into the library.
https://bugzilla.gnome.org/show_bug.cgi?id=639324
src/gnome-shell-plugin.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 96075f4..8d85fa2 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -670,3 +670,17 @@ MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin)
return &info;
}
+
+#if HAVE_BLUETOOTH
+/* HACK:
+ Add a non-static function that calls into libgnome-bluetooth-applet.so,
+ to avoid the linker being too smart and removing the dependency.
+ This function is never actually called.
+*/
+extern GType bluetooth_applet_get_type(void);
+void _shell_link_to_bluetooth(void);
+
+void _shell_link_to_bluetooth(void) {
+ bluetooth_applet_get_type();
+}
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]