void-packages/srcpkgs/pd/patches/musl-no-qsort_r.patch

15 lines
611 B
Diff

Index: src/x_text.c
===================================================================
--- a/src/x_text.c
+++ b/src/x_text.c
@@ -475,7 +475,8 @@ equal:
* Both are not available in Emscripten, Android or older MSVC versions.
* 'stupid_sortcompare' is thread-safe but not reentrant.
*/
-#if defined(_WIN32) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
+#if defined(_WIN32) || defined(__EMSCRIPTEN__) || defined(__ANDROID__) \
+ || (defined(__linux__) && !defined(__GLIBC__))
#define STUPID_SORT
static PERTHREAD void *stupid_zkeyinfo;
static int stupid_sortcompare(const void *z1, const void *z2)