blob: e219981ab059bf6ea00b06d39362b5fcd99f7412 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Sep 2015 18:53:31 +0000
4Subject: [PATCH 13/13] comparison_fn_t is glibc specific, use raw signature in
5 function pointer
6
7make it work with musl where comparison_fn_t is not provided
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 src/basic/util.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/basic/util.h b/src/basic/util.h
17index c7da6c39b..87f62b891 100644
18--- a/src/basic/util.h
19+++ b/src/basic/util.h
20@@ -98,7 +98,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
21 * Normal qsort requires base to be nonnull. Here were require
22 * that only if nmemb > 0.
23 */
24-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
25+static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
26 if (nmemb <= 1)
27 return;
28
29--
302.14.2
31