Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 12 Sep 2015 18:53:31 +0000 |
| 4 | Subject: [PATCH 13/13] comparison_fn_t is glibc specific, use raw signature in |
| 5 | function pointer |
| 6 | |
| 7 | make it work with musl where comparison_fn_t is not provided |
| 8 | |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | Upstream-Status: Pending |
| 12 | |
| 13 | src/basic/util.h | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/src/basic/util.h b/src/basic/util.h |
| 17 | index 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 | -- |
| 30 | 2.14.2 |
| 31 | |