summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-07-31 16:52:39 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-07-31 16:52:39 +0200
commit497b2d39427af4aaddbaa8922d4a6a858bbdaee7 (patch)
tree99f3e3ba024438b5561aab7a87f23a5656569c30 /gnu/packages/patches
parent51d4c79dc28c70cde61348eb52775f45125a2ee7 (diff)
gnu: dbus-c++: Fix build with GCC 7.
* gnu/packages/patches/dbus-c++-gcc-compat.patch, gnu/packages/patches/dbus-c++-threading-mutex.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (dbus-c++)[source](patches): New field. [arguments]: End phases on #t.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/dbus-c++-gcc-compat.patch14
-rw-r--r--gnu/packages/patches/dbus-c++-threading-mutex.patch37
2 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/patches/dbus-c++-gcc-compat.patch b/gnu/packages/patches/dbus-c++-gcc-compat.patch
new file mode 100644
index 0000000000..c4f126858c
--- /dev/null
+++ b/gnu/packages/patches/dbus-c++-gcc-compat.patch
@@ -0,0 +1,14 @@
+Fix a string comparison in C++ 11.
+
+Taken from Debian:
+https://sources.debian.org/src/dbus-c++/0.9.0-8.1/debian/patches/06_fix_gcc-7_ftbfs.patch/
+
+--- a/src/pipe.cpp
++++ b/src/pipe.cpp
+@@ -83,5 +83,5 @@ ssize_t Pipe::read(void *buffer, unsigne
+ void Pipe::signal()
+ {
+ // TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work...
+- ::write(_fd_write, '\0', 1);
++ ::write(_fd_write, "\0", 1);
+ }
diff --git a/gnu/packages/patches/dbus-c++-threading-mutex.patch b/gnu/packages/patches/dbus-c++-threading-mutex.patch
new file mode 100644
index 0000000000..b201700dc0
--- /dev/null
+++ b/gnu/packages/patches/dbus-c++-threading-mutex.patch
@@ -0,0 +1,37 @@
+Description: Fix FTBFS if DBUS_HAS_RECURSIVE_MUTEX is undefined
+Author: Peter Williams <peter@newton.cx>
+Last-Update: 2018-01-26
+
+Taken from Debian:
+https://sources.debian.org/src/dbus-c++/0.9.0-8.1/debian/patches/07_fix_mutex_ftbfs.patch/
+
+--- dbus-c++-0.9.0.orig/include/dbus-c++/dispatcher.h
++++ dbus-c++-0.9.0/include/dbus-c++/dispatcher.h
+@@ -267,6 +267,19 @@ struct Threading
+ return new Mx;
+ }
+
++#ifndef DBUS_HAS_RECURSIVE_MUTEX
++ static bool mutex_free(Mutex *mx)
++ {
++ delete mx;
++ return true;
++ }
++
++ static bool mutex_lock(Mutex *mx)
++ {
++ mx->lock();
++ return true;
++ }
++#else
+ static void mutex_free(Mutex *mx)
+ {
+ delete mx;
+@@ -276,6 +289,7 @@ struct Threading
+ {
+ mx->lock();
+ }
++#endif
+
+ static void mutex_unlock(Mutex *mx)
+ {