diff --git a/tests/regression/60-doublelocking/05-rec.c b/tests/regression/60-doublelocking/05-rec.c index 7a1b953f43..5bc94dbeda 100644 --- a/tests/regression/60-doublelocking/05-rec.c +++ b/tests/regression/60-doublelocking/05-rec.c @@ -5,18 +5,15 @@ #include #include -#ifdef __APPLE__ - // OS X does not have PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - int main(int argc, char const *argv[]) - { - return 0; - } -#else int g; pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; + +#ifndef __APPLE__ pthread_mutex_t mut2 = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +#endif + void* f1(void* ptr) { int top; @@ -39,11 +36,12 @@ int main(int argc, char const *argv[]) pthread_create(&t1,NULL,f1,NULL); pthread_join(t1, NULL); +#ifndef __APPLE__ pthread_mutex_lock(&mut2); //NOWARN pthread_mutex_lock(&mut2); //NOWARN pthread_mutex_unlock(&mut2); pthread_mutex_unlock(&mut2); +#endif return 0; } -#endif