[gnome-shell/gnome-3-12] extension-prefs: Force linking with libgnome-shell-js



commit c6067ffa1d31b7de8c936d6089a5da9a15450ea7
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Apr 10 17:33:25 2014 +0200

    extension-prefs: Force linking with libgnome-shell-js
    
    Use the same hack we use for the main executable to fool the linker
    when using --as-needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727948

 src/gnome-shell-extension-prefs.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-shell-extension-prefs.c b/src/gnome-shell-extension-prefs.c
index 75f687e..e97df5d 100644
--- a/src/gnome-shell-extension-prefs.c
+++ b/src/gnome-shell-extension-prefs.c
@@ -50,3 +50,18 @@ main (int argc, char *argv[])
 
   return 0;
 }
+
+
+/* HACK:
+   Add a dummy function that calls into libgnome-shell-js.so to ensure it's
+   linked to /usr/bin/gnome-shell-extension-prefs even when linking with
+   --as-needed. This function is never actually called.
+   https://bugzilla.gnome.org/show_bug.cgi?id=670477
+*/
+void _shell_link_to_shell_js (void);
+
+void
+_shell_link_to_shell_js (void)
+{
+  shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]