aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa/0001-PTHREAD_MUTEX_RECURSIVE_NP-is-specific-to-glibc.patch
blob: 52443d84226dd4c394f5a3a975fe8c33bef849ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 46cdd464efbada13478f5e39a50aef85599ff91b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 4 Apr 2015 15:50:53 -0700
Subject: [PATCH 1/2] PTHREAD_MUTEX_RECURSIVE_NP is specific to glibc

use glibc guard around it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
 include/c11/threads_posix.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
index f9c165d..c641de4 100644
--- a/include/c11/threads_posix.h
+++ b/include/c11/threads_posix.h
@@ -178,7 +178,7 @@ mtx_init(mtx_t *mtx, int type)
         return thrd_error;
     pthread_mutexattr_init(&attr);
     if ((type & mtx_recursive) != 0) {
-#if defined(__linux__) || defined(__linux)
+#if defined __GLIBC__ && (defined(__linux__) || defined(__linux))
         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
 #else
         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-- 
2.1.4