diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-01-17 16:58:41 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-01-21 10:02:01 -0800 |
| commit | ed9fd245a9336dfc095d3c14b265df5f8e7fc467 (patch) | |
| tree | 0ab2c6339937fb83836bdcca8272ef3e2e9ab09d /meta-oe/recipes-support | |
| parent | a56f11b144b5d69b6355bb22ffd4ab326199cf9d (diff) | |
| download | meta-openembedded-ed9fd245a9336dfc095d3c14b265df5f8e7fc467.tar.gz | |
satyr: Fix build with musl
Add missing typedefs for __compar_fn_t and compare_fn_t for
non __GLIBC__ case.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
| -rw-r--r-- | meta-oe/recipes-support/satyr/files/0002-fix-compile-failure-against-musl-C-library.patch | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/meta-oe/recipes-support/satyr/files/0002-fix-compile-failure-against-musl-C-library.patch b/meta-oe/recipes-support/satyr/files/0002-fix-compile-failure-against-musl-C-library.patch index b6c32c4bd5..24efc13560 100644 --- a/meta-oe/recipes-support/satyr/files/0002-fix-compile-failure-against-musl-C-library.patch +++ b/meta-oe/recipes-support/satyr/files/0002-fix-compile-failure-against-musl-C-library.patch | |||
| @@ -10,19 +10,17 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
| 10 | lib/rpm.c | 2 +- | 10 | lib/rpm.c | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 12 | ||
| 13 | diff --git a/lib/rpm.c b/lib/rpm.c | ||
| 14 | index 920e145..58140bf 100644 | ||
| 15 | --- a/lib/rpm.c | 13 | --- a/lib/rpm.c |
| 16 | +++ b/lib/rpm.c | 14 | +++ b/lib/rpm.c |
| 17 | @@ -191,7 +191,7 @@ sr_rpm_package_sort(struct sr_rpm_package *packages) | 15 | @@ -34,6 +34,11 @@ |
| 18 | } | 16 | #include <assert.h> |
| 17 | #include <string.h> | ||
| 19 | 18 | ||
| 20 | /* Sort the array. */ | 19 | +#if !defined(__GLIBC__) |
| 21 | - qsort(array, count, sizeof(struct sr_rpm_package*), (comparison_fn_t)cmp_nevra_qsort_wrapper); | 20 | +typedef int (*__compar_fn_t) (const void*, const void*); |
| 22 | + qsort(array, count, sizeof(struct sr_rpm_package*), cmp_nevra_qsort_wrapper); | 21 | +typedef __compar_fn_t comparison_fn_t; |
| 23 | 22 | +#endif | |
| 24 | /* Create a linked list from the sorted array. */ | 23 | + |
| 25 | for (size_t loop = 0; loop < count; ++loop) | 24 | struct sr_rpm_package * |
| 26 | -- | 25 | sr_rpm_package_new() |
| 27 | 2.8.1 | 26 | { |
| 28 | |||
