25 lines
884 B
Diff
25 lines
884 B
Diff
From 2940e7d8339195a8906338851a425c8fbcbbac58 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Sat, 12 Sep 2015 18:53:31 +0000
|
|
Subject: [PATCH 21/31] comparison_fn_t is glibc specific, use raw signature in
|
|
function pointer
|
|
|
|
make it work with musl where comparison_fn_t is not provided
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
src/basic/util.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/src/basic/util.h
|
|
+++ b/src/basic/util.h
|
|
@@ -772,7 +772,7 @@ int shall_restore_state(void);
|
|
* Normal qsort requires base to be nonnull. Here were require
|
|
* that only if nmemb > 0.
|
|
*/
|
|
-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
|
|
+static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
|
|
if (nmemb <= 1)
|
|
return;
|
|
|