# HG changeset patch # User Kim Alvefur # Date 1536326733 -7200 # Node ID 3a13c246b877c5bb6cb26945c49d7348ae4da1a1 # Parent db137a87511b0974ffd540411ea239975af7f891 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 diff -r db137a87511b -r 3a13c246b877 util-src/pposix.c --- 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()) {