gamin: fix a deadlock on newer glib
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 11 Oct 2014 21:52:27 +0000 (00:52 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 11 Oct 2014 21:55:45 +0000 (00:55 +0300)
recipes/gamin/files/no_recursive_locking.patch [new file with mode: 0644]
recipes/gamin/gamin_0.1.10.bb

diff --git a/recipes/gamin/files/no_recursive_locking.patch b/recipes/gamin/files/no_recursive_locking.patch
new file mode 100644 (file)
index 0000000..ed985fe
--- /dev/null
@@ -0,0 +1,36 @@
+diff -urp gamin-0.1.10_/server/inotify-helper.c gamin-0.1.10/server/inotify-helper.c
+--- gamin-0.1.10_/server/inotify-helper.c      2014-10-12 00:36:10.740701342 +0300
++++ gamin-0.1.10/server/inotify-helper.c       2014-10-12 00:36:18.084307517 +0300
+@@ -124,12 +124,9 @@ ih_sub_add (ih_sub_t * sub)
+ /**
+  * Cancels a subscription which was being monitored.
+  */
+-gboolean
++static gboolean
+ ih_sub_cancel (ih_sub_t * sub)
+ {
+-      G_LOCK(inotify_lock);
+-
+-
+       if (!sub->cancelled)
+       {
+               IH_W("cancelling %s\n", sub->pathname);
+@@ -140,7 +137,6 @@ ih_sub_cancel (ih_sub_t * sub)
+               sub_list = g_list_remove (sub_list, sub);
+       }
+-      G_UNLOCK(inotify_lock);
+       return TRUE;
+ }
+diff -urp gamin-0.1.10_/server/inotify-helper.h gamin-0.1.10/server/inotify-helper.h
+--- gamin-0.1.10_/server/inotify-helper.h      2014-10-12 00:36:10.740701342 +0300
++++ gamin-0.1.10/server/inotify-helper.h       2014-10-12 00:36:15.192462206 +0300
+@@ -34,7 +34,6 @@ gboolean      ih_startup             (event_callback_t
+                                        found_callback_t fcb);
+ gboolean       ih_running             (void);
+ gboolean       ih_sub_add             (ih_sub_t *sub);
+-gboolean       ih_sub_cancel          (ih_sub_t *sub);
+ /* Return FALSE from 'f' if the subscription should be cancelled */
+ void           ih_sub_foreach         (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
index 67f9183..f6c4149 100644 (file)
@@ -2,11 +2,12 @@ DESCRIPTION = "Gamin is a file and directory monitoring system defined to be a s
 LICENSE = "LGPL"
 DEPENDS = "glib-2.0"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \
            file://no-abstract-sockets.patch;patch=1 \
-          file://deprecated.patch;patch=1"
+          file://deprecated.patch;patch=1 \
+          file://no_recursive_locking.patch;patch=1"
 
 EXTRA_OECONF = " --without-python "