From: Enno Boland Date: Wed, 26 Apr 2017 09:02:13 +0000 (+0200) Subject: do not change stderr/stdout variables. X-Git-Tag: v227.4~1^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=ce8a001a9ddbd32588934743f4f7e4edb9cdb735 do not change stderr/stdout variables. musl for example marks those variables as const and therefore fails while building at this file. --- diff --git a/src/shared/pager.c b/src/shared/pager.c index bc2d0372c..789d20003 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -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);