summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/05_fix-bad-regex-in-awk-script.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/05_fix-bad-regex-in-awk-script.patch b/patches/05_fix-bad-regex-in-awk-script.patch
new file mode 100644
index 0000000..cf9aeeb
--- /dev/null
+++ b/patches/05_fix-bad-regex-in-awk-script.patch
@@ -0,0 +1,45 @@
+From: "P. J. McDermott" <pjm@nac.net>
+Description: Fix "bad regex" in scripts/gen-sorted.awk
+ BusyBox awk parses this:
+ .
+ sub(/\/[^/]+$/, "", subdir);
+ .
+ into this (using POSIX.1 terminal symbols):
+ .
+ BUILTIN_FUNC_NAME: sub
+ '(': (
+ ERE: \/[^
+ .
+ and fails because it cannot compile the regular expression "\/[^".
+ .
+ The slash in the bracket expression must be escaped to be parsed as expected in
+ BusyBox awk.
+
+diff -Naur src.orig/libc/scripts/gen-sorted.awk src/libc/scripts/gen-sorted.awk
+--- src.orig/libc/scripts/gen-sorted.awk 2006-08-16 21:18:26.000000000 -0400
++++ src/libc/scripts/gen-sorted.awk 2013-06-21 10:37:33.855053579 -0400
+@@ -16,7 +16,7 @@
+ {
+ subdir = type = FILENAME;
+ sub(/^.*\//, "", type);
+- sub(/\/[^/]+$/, "", subdir);
++ sub(/\/[^\/]+$/, "", subdir);
+ sub(/^.*\//, "", subdir);
+ thisdir = "";
+ }
+@@ -56,13 +56,13 @@
+ # The Subdirs file comes from an add-on that should have the subdirectory.
+ dir = FILENAME;
+ do
+- sub(/\/[^/]+$/, "", dir);
++ sub(/\/[^\/]+$/, "", dir);
+ while (dir !~ /\/sysdeps$/);
+ sub(/\/sysdeps$/, "", dir);
+ if (system("test -d " dir "/" thisdir) == 0)
+ dir = dir "/" thisdir;
+ else {
+- sub(/\/[^/]+$/, "", dir);
++ sub(/\/[^\/]+$/, "", dir);
+ if (system("test -d " dir "/" thisdir) == 0)
+ dir = dir "/" thisdir;
+ else {