From d2502bdcbb0c697c0c70fed92eb2f0972c12a7c1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 21 Jun 2013 13:24:22 -0400 Subject: Add patch to stop using awk asort() and asorti(). --- diff --git a/patches/06_fix-use-of-undefined-asort-awk-function.patch b/patches/06_fix-use-of-undefined-asort-awk-function.patch new file mode 100644 index 0000000..37a6295 --- /dev/null +++ b/patches/06_fix-use-of-undefined-asort-awk-function.patch @@ -0,0 +1,37 @@ +From: "P. J. McDermott" +Description: Don't use asort() and asorti() awk functions + BusyBox awk doesn't define them and they aren't necessary for simple array + iteration. + +diff -Naur src.orig/libc/scripts/option-groups.awk src/libc/scripts/option-groups.awk +--- src.orig/libc/scripts/option-groups.awk 2007-12-13 13:16:57.000000000 -0500 ++++ src/libc/scripts/option-groups.awk 2013-06-21 11:14:39.304717753 -0400 +@@ -32,10 +32,9 @@ + print "" + + # Produce a sorted list of variable names. +- i=0 ++ n=0 + for (var in vars) +- names[i++] = var +- n = asort (names) ++ names[n++] = var + + for (i = 1; i <= n; i++) + { +diff -Naur src.orig/libc/sysdeps/gnu/errlist-compat.awk src/libc/sysdeps/gnu/errlist-compat.awk +--- src.orig/libc/sysdeps/gnu/errlist-compat.awk 2012-04-21 13:19:39.000000000 -0400 ++++ src/libc/sysdeps/gnu/errlist-compat.awk 2013-06-21 13:17:44.606655144 -0400 +@@ -84,10 +84,8 @@ + printf "#define ERR_MAX %d\n\n", highest - 1; + } + +- # same regardless of awk's ordering of the associative array. +- num_compat_elems = asorti(compat, compat_indices) +- for (i = 1; i <= num_compat_elems; i++) { +- old = compat_indices[i] ++ for (compat_index in compat) { ++ old = compat_index; + new = compat[old]; + n = vcount[old]; + printf "#if SHLIB_COMPAT (libc, %s, %s)\n", old, new; -- cgit v0.9.1