From b1eb50599e4db7eb4501af75cbbfa22007081ea5 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 14 Jun 2018 02:22:19 -0500 Subject: The New Plan all pkgs needed to bootstrap -> system others -> user --- system/make/fix-atexit-exit.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 system/make/fix-atexit-exit.patch (limited to 'system/make/fix-atexit-exit.patch') diff --git a/system/make/fix-atexit-exit.patch b/system/make/fix-atexit-exit.patch new file mode 100644 index 000000000..a71d26fb5 --- /dev/null +++ b/system/make/fix-atexit-exit.patch @@ -0,0 +1,17 @@ +Author: Timo Teräs + +POSIX says the behaviour is undefined if atexit callback calls +exit(). On glibc it works, but on musl it does not. Call instead +_exit() which is guaranteed to work. + +--- ./output.c.orig ++++ ./output.c +@@ -495,7 +495,7 @@ + perror_with_name (_("write error: stdout"), ""); + else + O (error, NILF, _("write error: stdout")); +- exit (MAKE_TROUBLE); ++ _exit (MAKE_TROUBLE); + } + } + -- cgit v1.2.3-70-g09d2