Fix FTBFS if DBUS_HAS_RECURSIVE_MUTEX is undefined

Last-Update: 2018-01-26


Gbp-Pq: Name 07_fix_mutex_ftbfs.patch
This commit is contained in:
Peter Williams 2022-09-08 15:35:38 +08:00 committed by luoyaoming
parent 7dcbb90234
commit 1026b5dfec
1 changed files with 14 additions and 0 deletions

View File

@ -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)
{