UnixWare compilation fix (explicitly declare pthread_mutexattr_settype)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ef6a2689b4
commit
1d2e5548c4
@ -179,6 +179,12 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
|
|||||||
// portable, so try several methods
|
// portable, so try several methods
|
||||||
#ifdef HAVE_PTHREAD_MUTEXATTR_T
|
#ifdef HAVE_PTHREAD_MUTEXATTR_T
|
||||||
{
|
{
|
||||||
|
// on some systems pthread_mutexattr_settype() is not in the
|
||||||
|
// headers (but it is in the library, otherwise we wouldn't
|
||||||
|
// compile this code at all)
|
||||||
|
extern "C"
|
||||||
|
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
|
||||||
|
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
|
Loading…
Reference in New Issue
Block a user