aboutsummaryrefslogtreecommitdiff
path: root/packages/binutils/2.43.1/0002-MinGW-w64-winpthreads-doesn-t-have-pthread_mutexattr.patch
blob: 4cd75effbcb05d54409251a54b30ca4e48e615b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From 5ecb202705a6108aa38cab24f5d8d7d347e71ed6 Mon Sep 17 00:00:00 2001
From: Chris Packham <judge.packham@gmail.com>
Date: Mon, 8 Aug 2022 20:37:03 +1200
Subject: [PATCH 2/8] MinGW w64 winpthreads doesn't have
 pthread_mutexattr_settype

---
 gold/gold-threads.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/gold/gold-threads.cc
+++ b/gold/gold-threads.cc
@@ -101,7 +101,7 @@
   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));