sbcl rebuild
[arch-packages.git] / gnome-sharp / trunk / 04_initialize_dbus_glib_threading.patch
bloba7f8417181c80153655ce5df2db57cd9a3b13b28
1 From e9d06b56a54dcd399d1d3eaaf62bdacb7e07084d Mon Sep 17 00:00:00 2001
2 From: Mirco Bauer <meebey@meebey.net>
3 Date: Sat, 2 Mar 2013 13:44:46 +0100
4 Subject: [PATCH] Explicitly initialize D-Bus GLib threading
6 When gconf was switched from orbit to dbus it was no longer thread-safe by
7 default. This behavior can only get back by explicitly initializing dbus-glib's
8 threads. This issue affects multi-threaded GConf# users like Banshee leading
9 them to SEGVs.
11 For more details see:
12 https://bugzilla.gnome.org/show_bug.cgi?id=683830
13 ---
14 gconf/GConf/Client.cs | 11 +++++++++++
15 gconf/GConf/gconf-sharp.dll.config.in | 1 +
16 2 files changed, 12 insertions(+)
18 diff --git a/gconf/GConf/Client.cs b/gconf/GConf/Client.cs
19 index b8cc881..64efc9f 100644
20 --- a/gconf/GConf/Client.cs
21 +++ b/gconf/GConf/Client.cs
22 @@ -31,6 +31,17 @@ namespace GConf
23 [DllImport("gconf-2")]
24 static extern IntPtr gconf_client_get_default ();
26 + [DllImport("dbus-glib-1")]
27 + static extern void dbus_g_thread_init ();
29 + static Client ()
30 + {
31 + // HACK: we have to initialize dbus' threading else GConf with its
32 + // dbus backend will not be thread safe and SEGVs in our face, see:
33 + // https://bugzilla.gnome.org/show_bug.cgi?id=683830
34 + dbus_g_thread_init();
35 + }
37 public Client ()
39 Initialize ();
40 diff --git a/gconf/GConf/gconf-sharp.dll.config.in b/gconf/GConf/gconf-sharp.dll.config.in
41 index 9fb7d15..f20ddae 100644
42 --- a/gconf/GConf/gconf-sharp.dll.config.in
43 +++ b/gconf/GConf/gconf-sharp.dll.config.in
44 @@ -1,3 +1,4 @@
45 <configuration>
46 <dllmap dll="gconf-2" target="libgconf-2@LIB_PREFIX@.4@LIB_SUFFIX@"/>
47 + <dllmap dll="dbus-glib-1" target="libdbus-glib-1@LIB_PREFIX@.2@LIB_SUFFIX@"/>
48 </configuration>
49 --
50 1.7.10.4