17 lines
584 B
Diff
17 lines
584 B
Diff
|
diff --git shared/systemd/src/basic/sort-util.h shared/systemd/src/basic/sort-util.h
|
||
|
index e029f8646..168735087 100644
|
||
|
--- shared/systemd/src/basic/sort-util.h
|
||
|
+++ shared/systemd/src/basic/sort-util.h
|
||
|
@@ -60,7 +60,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) \
|