MinGW w64 winpthreads doesn't have pthread_mutexattr_settype

This commit is contained in:
Chris Packham
2022-08-08 20:37:03 +12:00
committed by Anton Maklakov
parent 135186e5a3
commit 13a19c9569

View File

@@ -101,7 +101,7 @@ Lock_impl_threads::Lock_impl_threads()
int err = pthread_mutexattr_init(&attr);
if (err != 0)
gold_fatal(_("pthead_mutexattr_init failed: %s"), strerror(err));
#ifdef PTHREAD_MUTEX_ADAPTIVE_NP
#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32)
err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
if (err != 0)
gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err));