diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 10:50:09 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 10:50:09 +0000 |
commit | 46a7358a93aed937ef52092184446ff8a02351b1 (patch) | |
tree | bc2c469969e61c766ac3152c8f29f64f140f2afd /main/make/fix-atexit-exit.patch | |
parent | 820d4a7b31f60208d825706850d12cfea071a107 (diff) | |
download | aports-46a7358a93aed937ef52092184446ff8a02351b1.tar.bz2 aports-46a7358a93aed937ef52092184446ff8a02351b1.tar.xz |
main/make: fix atexit handler (fixes test suite under musl)
Diffstat (limited to 'main/make/fix-atexit-exit.patch')
-rw-r--r-- | main/make/fix-atexit-exit.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/main/make/fix-atexit-exit.patch b/main/make/fix-atexit-exit.patch new file mode 100644 index 000000000..dd7cc25f7 --- /dev/null +++ b/main/make/fix-atexit-exit.patch @@ -0,0 +1,16 @@ +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. + +--- make-3.82.orig/misc.c ++++ make-3.82/misc.c +@@ -954,6 +954,6 @@ + error (NILF, _("write error: %s"), strerror (errno)); + else + error (NILF, _("write error")); +- exit (EXIT_FAILURE); ++ _exit (EXIT_FAILURE); + } + } |