diff options
Diffstat (limited to 'meta/recipes-extended/libsolv/libsolv/0001-utils-Conside-musl-when-wrapping-qsort_r.patch')
-rw-r--r-- | meta/recipes-extended/libsolv/libsolv/0001-utils-Conside-musl-when-wrapping-qsort_r.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-extended/libsolv/libsolv/0001-utils-Conside-musl-when-wrapping-qsort_r.patch b/meta/recipes-extended/libsolv/libsolv/0001-utils-Conside-musl-when-wrapping-qsort_r.patch new file mode 100644 index 0000000000..da93a12ed5 --- /dev/null +++ b/meta/recipes-extended/libsolv/libsolv/0001-utils-Conside-musl-when-wrapping-qsort_r.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From e1db3c41fa84391b7ab299f7351f58b413ed2994 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 28 Oct 2021 22:28:45 -0700 | ||
4 | Subject: [PATCH] utils: Conside musl when wrapping qsort_r | ||
5 | |||
6 | musl now has implemented qsort_r, the signature however matches glibc | ||
7 | and not BSD, current check makes it such that it falls into BSD case | ||
8 | when building for musl, which clearly is wrong, therefore instead of | ||
9 | just checking for glibc check for linux to decide which qsort_r | ||
10 | signature to use. This covers both glibc and musl | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/util.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/util.c b/src/util.c | ||
20 | index 72426e09..8f29bc5a 100644 | ||
21 | --- a/src/util.c | ||
22 | +++ b/src/util.c | ||
23 | @@ -159,7 +159,7 @@ solv_setcloexec(int fd, int state) | ||
24 | |||
25 | see also: http://sources.redhat.com/ml/libc-alpha/2008-12/msg00003.html | ||
26 | */ | ||
27 | -#if (defined(__GLIBC__) || defined(__NEWLIB__)) && (defined(HAVE_QSORT_R) || defined(HAVE___QSORT_R)) | ||
28 | +#if (defined(__linux__) || defined(__NEWLIB__)) && (defined(HAVE_QSORT_R) || defined(HAVE___QSORT_R)) | ||
29 | |||
30 | void | ||
31 | solv_sort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *compard) | ||