blob: 92a8563e6008e0aa45bf2678f2a172ba7555a4dc (
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
|
$NetBSD: patch-af,v 1.5 2001/12/05 04:56:21 jlam Exp $
--- Sources/Core/System/Unix/mutex_pthread.cpp.orig Thu Dec 14 18:45:06 2000
+++ Sources/Core/System/Unix/mutex_pthread.cpp Thu Dec 14 18:45:11 2000
@@ -21,7 +21,11 @@
// suck:
extern "C"
{
+#ifndef _PTH_PTHREAD_H_
int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
+#else
+ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind);
+#endif
}
CL_Mutex *CL_Mutex::create()
@@ -33,7 +37,11 @@
{
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
+#ifndef _PTH_PTHREAD_H_
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+#else
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+#endif
pthread_mutex_init(&mutex, &attr);
pthread_mutexattr_destroy(&attr);
|