]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix for gcc
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 12 Apr 2003 18:37:20 +0000 (18:37 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 12 Apr 2003 18:37:20 +0000 (18:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/threadpsx.cpp

index e38cdf11da0f9240ce68a6c9439ffc873119ce00..597f87eb8dab0f164b498bad88bf414aeabe6da1 100644 (file)
@@ -166,6 +166,12 @@ private:
     friend class wxConditionInternal;
 };
 
+#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);
+#endif
+
 wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
 {
     int err;
@@ -179,12 +185,6 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
             // portable, so try several methods
 #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_init(&attr);
                 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);