From: "P. J. McDermott" 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 {