From 1026b5dfec92bfb52cba60ac58947f62792651a8 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 8 Sep 2022 15:35:38 +0800 Subject: [PATCH] Fix FTBFS if DBUS_HAS_RECURSIVE_MUTEX is undefined Last-Update: 2018-01-26 Gbp-Pq: Name 07_fix_mutex_ftbfs.patch --- include/dbus-c++/dispatcher.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/dbus-c++/dispatcher.h b/include/dbus-c++/dispatcher.h index b5b5536..f393e1a 100644 --- a/include/dbus-c++/dispatcher.h +++ b/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) {