Backport libdbusc++ from poky upstream
[AGL/meta-agl-demo.git] / recipes-core / dbus / libdbus-c++-0.9.0 / 0001-src-eventloop.cpp-use-portable-method-for-initializi.patch
1 From 93fd4868d71aa7a26cdfd382d1e4c85112f069f9 Mon Sep 17 00:00:00 2001
2 From: Peter Williams <peter@newton.cx>
3 Date: Sat, 19 Dec 2015 21:07:37 -0500
4 Subject: [PATCH] src/eventloop.cpp: use portable method for initializing
5  recursive mutex
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 ---
11 Upstream-Status: Backport [https://github.com/andreas-volz/dbus-cplusplus/commit/cdaeaa825db191bd65aad3aaaeb3178738727f05]
12 Signed-off-by: AndrĂ© Draszik <adraszik@tycoint.com>
13  src/eventloop.cpp | 7 +++++--
14  1 file changed, 5 insertions(+), 2 deletions(-)
15
16 diff --git a/src/eventloop.cpp b/src/eventloop.cpp
17 index 7fb06a3..f622812 100644
18 --- a/src/eventloop.cpp
19 +++ b/src/eventloop.cpp
20 @@ -85,8 +85,11 @@ DefaultMutex::DefaultMutex(bool recursive)
21  {
22    if (recursive)
23    {
24 -    pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
25 -    _mutex = recmutex;
26 +    pthread_mutexattr_t attr;
27 +
28 +    pthread_mutexattr_init(&attr);
29 +    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
30 +    pthread_mutex_init(&_mutex, &attr);
31    }
32    else
33    {
34 -- 
35 2.10.2
36