diff options
author | Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | 2022-05-23 10:20:12 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-23 21:31:07 +0100 |
commit | 89c8a3f96dfeb444213fd6c523e1495c49065ccc (patch) | |
tree | e20bb726b3de0d1c56602cdad3f29e29ea4baf4a /meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch | |
parent | 25d8defc806ed760d371423a7ef99bd872462d1e (diff) | |
download | openembedded-core-contrib-89c8a3f96dfeb444213fd6c523e1495c49065ccc.tar.gz |
systemd: Remove __compare_fn_t type in musl-specific patch
Since systemd v250, commit d8f16737005e ("sort-util: avoid using
glibc's internal __compar_d_fn_t type"), __compare_fn_t type is no
longer used. This patch removes that type in the musl-specific patch.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch new file mode 100644 index 0000000000..c28c8381e8 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch @@ -0,0 +1,61 @@ +From 5513b918d02900a3a78fd0e0300a118b163edfef Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Mon, 25 Feb 2019 13:55:12 +0800 +Subject: [PATCH] missing_type.h: add comparison_fn_t + +Make it work with musl where comparison_fn_t and is not provided. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +[Rebased for v244] +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> +[Rebased for v250, Drop __compare_fn_t] +Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> +--- + src/basic/missing_type.h | 4 ++++ + src/basic/sort-util.h | 1 + + src/libsystemd/sd-journal/catalog.c | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h +index f6233090a9..6c0456349d 100644 +--- a/src/basic/missing_type.h ++++ b/src/basic/missing_type.h +@@ -10,3 +10,7 @@ + #if !HAVE_CHAR16_T + #define char16_t uint16_t + #endif ++ ++#ifndef __GLIBC__ ++typedef int (*comparison_fn_t)(const void *, const void *); ++#endif +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index 02a6784d99..0b33c83d59 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -4,6 +4,7 @@ + #include <stdlib.h> + + #include "macro.h" ++#include "missing_type.h" + + /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the + * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that +diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c +index 8fc87b131a..36a6efdbd8 100644 +--- a/src/libsystemd/sd-journal/catalog.c ++++ b/src/libsystemd/sd-journal/catalog.c +@@ -28,6 +28,7 @@ + #include "string-util.h" + #include "strv.h" + #include "tmpfile-util.h" ++#include "missing_type.h" + + const char * const catalog_file_dirs[] = { + "/usr/local/lib/systemd/catalog/", +-- +2.34.1 + |