summaryrefslogtreecommitdiff
path: root/user/networkmanager/qsort_r.patch
blob: 39235787fb18c7522646235f1c257c279b78d08f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Gottox @ Void

diff --git shared/systemd/src/basic/sort-util.h shared/systemd/src/basic/sort-util.h
index e029f8646..168735087 100644
--- a/shared/systemd/src/basic/sort-util.h
+++ b/shared/systemd/src/basic/sort-util.h
@@ -67,7 +67,11 @@ static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_
                 return;
 
         assert(base);
+#ifdef __GLIBC__
         qsort_r(base, nmemb, size, compar, userdata);
+#else
+        g_qsort_with_data(base, nmemb, size, compar, userdata);
+#endif
 }
 
 #define typesafe_qsort_r(p, n, func, userdata)                          \