chiark / gitweb /
do not change stderr/stdout variables.
authorEnno Boland <g@s01.de>
Wed, 26 Apr 2017 09:02:13 +0000 (11:02 +0200)
committerEnno Boland <g@s01.de>
Wed, 26 Apr 2017 10:46:55 +0000 (12:46 +0200)
musl for example marks those variables as const and therefore
fails while building at this file.

src/shared/pager.c

index bc2d0372c86983d70b622745af8ed79c174ec469..789d20003b2d8aeca1ca532593a21cd089afe5c5 100644 (file)
@@ -150,8 +150,13 @@ void pager_close(void) {
                 return;
 
         /* Inform pager that we are done */
+#if defined(__GLIBC__)
         stdout = safe_fclose(stdout);
         stderr = safe_fclose(stderr);
+#else
+        (void) safe_fclose(stdout);
+        (void) safe_fclose(stderr);
+#endif // in musl-libc these are const
 
         (void) kill(pager_pid, SIGCONT);
         (void) wait_for_terminate(pager_pid, NULL);