summaryrefslogtreecommitdiff
path: root/system/make/fix-atexit-exit.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:19 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:56 -0500
commitb1eb50599e4db7eb4501af75cbbfa22007081ea5 (patch)
treec94a34c882cc17adedd781e8c5f34349b2a62416 /system/make/fix-atexit-exit.patch
parentb9e85bbdcf38547ef2ca4e5c2a6e6293bbcd2752 (diff)
downloadpackages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.gz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.bz2
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.xz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.zip
The New Plan
all pkgs needed to bootstrap -> system others -> user
Diffstat (limited to 'system/make/fix-atexit-exit.patch')
-rw-r--r--system/make/fix-atexit-exit.patch17
1 files changed, 17 insertions, 0 deletions
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 <timo.teras@iki.fi>
+
+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);
+ }
+ }
+