gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / patches / dbus-c++-threading-mutex.patch
1 Description: Fix FTBFS if DBUS_HAS_RECURSIVE_MUTEX is undefined
2 Author: Peter Williams <peter@newton.cx>
3 Last-Update: 2018-01-26
4
5 Taken from Debian:
6 https://sources.debian.org/src/dbus-c++/0.9.0-8.1/debian/patches/07_fix_mutex_ftbfs.patch/
7
8 --- dbus-c++-0.9.0.orig/include/dbus-c++/dispatcher.h
9 +++ dbus-c++-0.9.0/include/dbus-c++/dispatcher.h
10 @@ -267,6 +267,19 @@ struct Threading
11 return new Mx;
12 }
13
14 +#ifndef DBUS_HAS_RECURSIVE_MUTEX
15 + static bool mutex_free(Mutex *mx)
16 + {
17 + delete mx;
18 + return true;
19 + }
20 +
21 + static bool mutex_lock(Mutex *mx)
22 + {
23 + mx->lock();
24 + return true;
25 + }
26 +#else
27 static void mutex_free(Mutex *mx)
28 {
29 delete mx;
30 @@ -276,6 +289,7 @@ struct Threading
31 {
32 mx->lock();
33 }
34 +#endif
35
36 static void mutex_unlock(Mutex *mx)
37 {