diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index 36e0699da9..c6213ab88e 100644 --- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -8,20 +8,23 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> --- - src/basic/util.h | 14 -------------- + src/basic/sort-util.h | 14 -------------- src/libsystemd/sd-hwdb/hwdb-util.c | 19 ++++++++++++++----- src/shared/format-table.c | 36 ++++++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 31 deletions(-) -diff --git a/src/basic/util.h b/src/basic/util.h -index dc33d66..9f6a6ce 100644 ---- a/src/basic/util.h -+++ b/src/basic/util.h -@@ -116,20 +116,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index e029f8646e..27d68b341c 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn + int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ }) - +- -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { - if (nmemb <= 1) - return; @@ -35,15 +38,11 @@ index dc33d66..9f6a6ce 100644 - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ - }) -- - /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */ - static inline void memcpy_safe(void *dst, const void *src, size_t n) { - if (n == 0) diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c -index f852967..b570ce1 100644 +index c83575c7c8..72f8f3a050 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c -@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) { +@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) { DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); @@ -60,7 +59,7 @@ index f852967..b570ce1 100644 } static int trie_node_add_value(struct trie *trie, struct trie_node *node, -@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, +@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .value_off = v, }; @@ -72,7 +71,7 @@ index f852967..b570ce1 100644 if (val) { /* At this point we have 2 identical properties on the same match-string. * Since we process files in order, we just replace the previous value. */ -@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, +@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .line_number = line_number, }; node->values_count++; @@ -84,10 +83,10 @@ index f852967..b570ce1 100644 } diff --git a/src/shared/format-table.c b/src/shared/format-table.c -index 7d52980..75dbfe1 100644 +index a5c0a99b08..d595cbe372 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c -@@ -848,31 +848,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t +@@ -850,31 +850,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t return CMP(index_a, index_b); } @@ -131,7 +130,7 @@ index 7d52980..75dbfe1 100644 } /* Order identical lines by the order there were originally added in */ -@@ -1105,7 +1107,12 @@ int table_print(Table *t, FILE *f) { +@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) { for (i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -145,7 +144,7 @@ index 7d52980..75dbfe1 100644 } if (t->display_map) -@@ -1532,7 +1539,12 @@ int table_to_json(Table *t, JsonVariant **ret) { +@@ -1534,7 +1541,12 @@ int table_to_json(Table *t, JsonVariant **ret) { for (i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -160,5 +159,5 @@ index 7d52980..75dbfe1 100644 if (t->display_map) -- -2.7.4 +2.11.0 |