void-packages/srcpkgs/enigma/patches/musl-redirect.patch
2015-11-19 12:35:15 +01:00

32 lines
1.1 KiB
Diff

In musl libc stdout and stderr are const and can't be
set to different files, thus disable --redirect.
--- src/main.cc 2014-12-19 22:24:38.000000000 +0100
+++ src/main.cc 2015-11-18 21:54:09.698790150 +0100
@@ -131,7 +131,9 @@
" --nomusic Disable music\n"
" --nosound Disable music and sound effects\n"
" --pref -p file Use filename or dirname for preferences\n"
+#if defined(__GLIBC__)
" --redirect Redirect stdout/stderr to files on user path\n"
+#endif
" --robinson avoid connections to the internet\n"
" --showfps Show the framerate (FPS) during the Game\n"
" --version Print the executable's version number\n"
@@ -298,6 +300,7 @@
#ifdef WIN32
ap.redirect = true;
#endif
+#if defined(__GLIBC__)
if (ap.redirect) {
FILE *newfp;
newfp = std::freopen((userStdPath + "/Output.log").c_str(), "w", stdout);
@@ -318,6 +321,7 @@
}
setbuf(stderr, NULL); // No buffering
}
+#endif
// initialize logfile -- needs ap
if (ap.do_log)