From 24b8a838d4e858b9117d0ae9196715d90273c110 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sat, 28 Oct 2017 16:07:55 +0200 Subject: [PATCH] use fallback qsort implementation on linux systems without glibc --- include/sort_r.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/sort_r.h b/include/sort_r.h index 6818ac31e..061aed7aa 100644 --- a/include/sort_r.h +++ b/include/sort_r.h @@ -186,10 +186,15 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w, /* no qsort_r in glibc before 2.8, need to use nested qsort */ sort_r_simple(base, nel, width, compar, arg); - #else + #elif defined __GLIBC__ qsort_r(base, nel, width, compar, arg); + #else + + /* Fall back to our own quicksort implementation */ + sort_r_simple(base, nel, width, compar, arg); + #endif #elif defined _SORT_R_BSD