mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 04:05:40 +03:00
Build with Eric Timmon's musl patches, build on armv7 & x86_64. aarch64 port in progress.
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
#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
|
|
|