]> code.ossystems Code Review - openembedded-core.git/blob
f392ceafcc25940dbbb0c1b98172d059bfea3650
[openembedded-core.git] /
1 From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
2 From: Tim Orling <timothy.t.orling@linux.intel.com>
3 Date: Thu, 28 Dec 2017 21:24:57 -0800
4 Subject: [PATCH 1/3] 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 Reuse the approach from systemd:
10 systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
11
12 Based on work by: Khem Raj <raj.khem@gmail.com>
13
14 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
15 ---
16 Upstream-Status: Pending
17
18  src/util.h | 2 +-
19  1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/src/util.h b/src/util.h
22 index 561f9e7..e9cfd81 100644
23 --- a/src/util.h
24 +++ b/src/util.h
25 @@ -57,7 +57,7 @@ extern char **saved_argv;
26   * Normal qsort requires base to be nonnull. Here were require
27   * that only if nmemb > 0.
28   */
29 -static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
30 +static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
31          if (nmemb <= 1)
32                  return;
33  
34 -- 
35 2.13.6
36