aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-07 15:25:33 +0200
committerKim Alvefur <zash@zash.se>2018-09-07 15:25:33 +0200
commitcc97b763045ecc5a813c13f563c373390588e7d3 (patch)
tree2044393c0a20a45a9520a89e2d8ff7b43b39eb2b /util-src
parentb447c09fcc8e1b34b7751b4bfb3d553fcb479117 (diff)
downloadprosody-cc97b763045ecc5a813c13f563c373390588e7d3.tar.gz
prosody-cc97b763045ecc5a813c13f563c373390588e7d3.zip
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
Diffstat (limited to 'util-src')
-rw-r--r--util-src/pposix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index f9a60600..00592c99 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -111,9 +111,9 @@ static int lc_daemonize(lua_State *L) {
}
/* 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()) {