Software / code / prosody
Changeset
9276:3a13c246b877
util.pposix: Do not attempt to assign to stdio variables [pedantic]
Fixes build on gcc 6.4.0
See also https://stackoverflow.com/a/586416
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 07 Sep 2018 15:25:33 +0200 |
| parents | 9275:db137a87511b |
| children | 9277:fa6a6f921405 |
| files | util-src/pposix.c |
| diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/pposix.c Fri Sep 07 10:46:30 2018 +0100 +++ b/util-src/pposix.c Fri Sep 07 15:25:33 2018 +0200 @@ -111,9 +111,9 @@ } /* Make sure accidental use of FDs 0, 1, 2 don't cause weirdness */ - stdin = freopen("/dev/null", "r", stdin); - stdout = freopen("/dev/null", "w", stdout); - stderr = freopen("/dev/null", "w", stderr); + freopen("/dev/null", "r", stdin); + freopen("/dev/null", "w", stdout); + freopen("/dev/null", "w", stderr); /* Final fork, use it wisely */ if(fork()) {