nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1Allow BusyBox to be invoked as "<something>-busybox". This is
2necessary when it's run from the Nix store as <hash>-busybox during
3stdenv bootstrap.
4--- a/libbb/appletlib.c
5+++ b/libbb/appletlib.c
6@@ -947,7 +947,7 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **ar
7 static NORETURN void run_applet_and_exit(const char *name, char **argv)
8 {
9 # if ENABLE_BUSYBOX
10- if (is_prefixed_with(name, "busybox"))
11+ if (strstr(name, "busybox") != 0)
12 exit(busybox_main(/*unused:*/ 0, argv));
13 # endif
14 # if NUM_APPLETS > 0
15@@ -1045,7 +1045,7 @@ int main(int argc UNUSED_PARAM, char **argv)
16
17 lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
18 # if !ENABLE_BUSYBOX
19- if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
20+ if (argv[1] && strstr(bb_basename(argv[0]), "busybox") != 0)
21 argv++;
22 # endif
23 applet_name = argv[0];