diff options
author | P. J. McDermott <pjm@nac.net> | 2013-06-21 13:24:22 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-06-21 13:24:22 (EDT) |
commit | d2502bdcbb0c697c0c70fed92eb2f0972c12a7c1 (patch) | |
tree | f0b8afe348b52a2f2cd75b13d2872282e58b557c /patches | |
parent | 1f241a7edb7aae0df0bba6ce1b35bfd13774d58a (diff) |
Add patch to stop using awk asort() and asorti().
Diffstat (limited to 'patches')
-rw-r--r-- | patches/06_fix-use-of-undefined-asort-awk-function.patch | 37 |
1 files changed, 37 insertions, 0 deletions
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" <pjm@nac.net> +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; |