aboutsummaryrefslogtreecommitdiffstats
path: root/main/elfutils/musl-qsort_r.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-02-13 18:57:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-02-14 18:50:07 +0000
commite8fa24936ac303abe0978950898625fca30b17ec (patch)
tree192ac8fcc535b189065ca35fce455c67519d4a1e /main/elfutils/musl-qsort_r.patch
parent69a9add8425a3ac8a4ce5294354a543c63d35e39 (diff)
downloadaports-e8fa24936ac303abe0978950898625fca30b17ec.tar.bz2
aports-e8fa24936ac303abe0978950898625fca30b17ec.tar.xz
main/elfutils: move from testing
Diffstat (limited to 'main/elfutils/musl-qsort_r.patch')
-rw-r--r--main/elfutils/musl-qsort_r.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/main/elfutils/musl-qsort_r.patch b/main/elfutils/musl-qsort_r.patch
new file mode 100644
index 0000000000..e1455baf69
--- /dev/null
+++ b/main/elfutils/musl-qsort_r.patch
@@ -0,0 +1,56 @@
+--- a/src/readelf.c 2015-10-12 12:22:58.000000000 +0200
++++ b/src/readelf.c 2015-11-20 08:11:32.945159213 +0100
+@@ -4366,10 +4366,11 @@
+ return base;
+ }
+
++static const char *listptr_name;
++
+ static int
+-compare_listptr (const void *a, const void *b, void *arg)
++compare_listptr (const void *a, const void *b)
+ {
+- const char *name = arg;
+ struct listptr *p1 = (void *) a;
+ struct listptr *p2 = (void *) b;
+
+@@ -4385,21 +4386,21 @@
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different address sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (p1->dwarf64 != p2->dwarf64)
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different offset sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (listptr_base (p1) != listptr_base (p2))
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different base addresses"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ }
+
+@@ -4464,9 +4465,11 @@
+ static void
+ sort_listptr (struct listptr_table *table, const char *name)
+ {
+- if (table->n > 0)
+- qsort_r (table->table, table->n, sizeof table->table[0],
+- &compare_listptr, (void *) name);
++ if (table->n > 0) {
++ listptr_name = name;
++ qsort (table->table, table->n, sizeof table->table[0],
++ &compare_listptr);
++ }
+ }
+
+ static bool