blob: a49357e3eb7ec3dc2bb18bc67cd0fedf253a5644 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#2020/01/30 Patch has not yet been accepted upstream
From c81b8fe3e63b7267ac8f6aeea86811acd888e8e9 Mon Sep 17 00:00:00 2001
From: Eric Timmons <etimmons@mit.edu>
Date: Sun, 2 Dec 2018 14:10:23 -0500
Subject: [PATCH 2/4] Fix threads on musl libc
Musl libc does not add any content to _CS_GNU_LIBPTHREAD_VERSION, causing the
runtime check to make sure the thread implementation is NPTL to fail. There
seems to be no way to test not NPTL at run time on musl, so if the configuration
value is empty, just assume the thread implementation is good enough.
---
src/runtime/linux-os.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c
index 89244e793..e98c68cc4 100644
--- a/src/runtime/linux-os.c
+++ b/src/runtime/linux-os.c
@@ -186,8 +186,15 @@ isnptl (void)
if (strstr (buf, "NPTL")) {
return 1;
}
+ else {
+ return 0;
+ }
+ }
+ else {
+ /* If the configuration variable is empty, just assume we have a
+ * good enough thread implementation. */
+ return 1;
}
- return 0;
}
#endif
--
2.24.1
|