void-packages/srcpkgs/enigma/patches/musl-redirect.patch
ologantr 6081d36cb9 enigma: update to 1.30.
Also:
- take maintainership
- move to SDL2.0
- use system libenet instead of the bundled one
2022-06-30 13:30:19 -04:00

21 lines
922 B
Diff

We can't assign to *stdout and *stderr with musl libc
because both file pointers are const.
--- a/src/main.cc 2022-06-30 12:30:19.904327808 +0200
+++ b/src/main.cc 2022-06-30 12:30:57.351968860 +0200
@@ -315,2 +315,3 @@ void Application::init(int argc, char **
newfp = std::freopen((userStdPath + "/Output.log").c_str(), "w", stdout);
+#if defined(__GLIBC__)
if ( newfp == NULL ) { // This happens on NT
@@ -321,2 +322,3 @@ void Application::init(int argc, char **
}
+#endif
setvbuf(stdout, NULL, _IOLBF, BUFSIZ); // Line buffered
@@ -324,2 +326,3 @@ void Application::init(int argc, char **
newfp = std::freopen((userStdPath + "/Error.log").c_str(), "w", stderr);
+#if defined(__GLIBC__)
if ( newfp == NULL ) { // This happens on NT
@@ -330,2 +333,3 @@ void Application::init(int argc, char **
}
+#endif
setbuf(stderr, NULL); // No buffering