summarylogtreecommitdiffstats
path: root/04_initialize_dbus_glib_threading.patch
diff options
context:
space:
mode:
authorQue Quotion2019-11-20 00:20:33 +0900
committerQue Quotion2019-11-20 00:22:43 +0900
commit15410f7b9e07268d790f7cf0c6eb845c8d14cd0a (patch)
tree6f680134481bddbd6ccb0c09a2628c069e971dbb /04_initialize_dbus_glib_threading.patch
parent799ce759a712b0933a9464a77cec961527813ae4 (diff)
downloadaur-15410f7b9e07268d790f7cf0c6eb845c8d14cd0a.tar.gz
Publish gconf-sharp package as well.
Diffstat (limited to '04_initialize_dbus_glib_threading.patch')
-rw-r--r--04_initialize_dbus_glib_threading.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/04_initialize_dbus_glib_threading.patch b/04_initialize_dbus_glib_threading.patch
new file mode 100644
index 000000000000..a7f8417181c8
--- /dev/null
+++ b/04_initialize_dbus_glib_threading.patch
@@ -0,0 +1,51 @@
+From e9d06b56a54dcd399d1d3eaaf62bdacb7e07084d Mon Sep 17 00:00:00 2001
+From: Mirco Bauer <meebey@meebey.net>
+Date: Sat, 2 Mar 2013 13:44:46 +0100
+Subject: [PATCH] Explicitly initialize D-Bus GLib threading
+
+When gconf was switched from orbit to dbus it was no longer thread-safe by
+default. This behavior can only get back by explicitly initializing dbus-glib's
+threads. This issue affects multi-threaded GConf# users like Banshee leading
+them to SEGVs.
+
+For more details see:
+https://bugzilla.gnome.org/show_bug.cgi?id=683830
+---
+ gconf/GConf/Client.cs | 11 +++++++++++
+ gconf/GConf/gconf-sharp.dll.config.in | 1 +
+ 2 files changed, 12 insertions(+)
+
+diff --git a/gconf/GConf/Client.cs b/gconf/GConf/Client.cs
+index b8cc881..64efc9f 100644
+--- a/gconf/GConf/Client.cs
++++ b/gconf/GConf/Client.cs
+@@ -31,6 +31,17 @@ namespace GConf
+ [DllImport("gconf-2")]
+ static extern IntPtr gconf_client_get_default ();
+
++ [DllImport("dbus-glib-1")]
++ static extern void dbus_g_thread_init ();
++
++ static Client ()
++ {
++ // HACK: we have to initialize dbus' threading else GConf with its
++ // dbus backend will not be thread safe and SEGVs in our face, see:
++ // https://bugzilla.gnome.org/show_bug.cgi?id=683830
++ dbus_g_thread_init();
++ }
++
+ public Client ()
+ {
+ Initialize ();
+diff --git a/gconf/GConf/gconf-sharp.dll.config.in b/gconf/GConf/gconf-sharp.dll.config.in
+index 9fb7d15..f20ddae 100644
+--- a/gconf/GConf/gconf-sharp.dll.config.in
++++ b/gconf/GConf/gconf-sharp.dll.config.in
+@@ -1,3 +1,4 @@
+ <configuration>
+ <dllmap dll="gconf-2" target="libgconf-2@LIB_PREFIX@.4@LIB_SUFFIX@"/>
++ <dllmap dll="dbus-glib-1" target="libdbus-glib-1@LIB_PREFIX@.2@LIB_SUFFIX@"/>
+ </configuration>
+--
+1.7.10.4
+