tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
minimal-bootstrap.musl11: always flush stdio
Emily Trau
2 years ago
7287781f
e2520589
+14
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
minimal-bootstrap
musl
1.1.nix
always-flush.patch
+2
pkgs/os-specific/linux/minimal-bootstrap/musl/1.1.nix
···
58
58
# url = "${liveBootstrap}/patches/stdio_flush_on_exit.patch";
59
59
# hash = "sha256-/z5ze3h3QTysay8nRvyvwPv3pmTcKptdkBIaMCoeLDg=";
60
60
# })
61
61
+
# HACK: always flush stdio immediately
62
62
+
./always-flush.patch
61
63
(fetchurl {
62
64
url = "${liveBootstrap}/patches/va_list.patch";
63
65
hash = "sha256-UmcMIl+YCi3wIeVvjbsCyqFlkyYsM4ECNwTfXP+s7vg=";
+12
pkgs/os-specific/linux/minimal-bootstrap/musl/always-flush.patch
···
1
1
+
diff --git src/env/__libc_start_main.c src/env/__libc_start_main.c
2
2
+
index 8fbe526..9476c22 100644
3
3
+
--- src/env/__libc_start_main.c
4
4
+
+++ src/env/__libc_start_main.c
5
5
+
@@ -91,6 +91,7 @@ static int libc_start_main_stage2(int (*main)(int,char **,char **), int argc, ch
6
6
+
__libc_start_init();
7
7
+
8
8
+
/* Pass control to the application */
9
9
+
+ setbuf(stdout, NULL);
10
10
+
exit(main(argc, argv, envp));
11
11
+
return 0;
12
12
+
}