aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/pposix.c
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
commit53c20a796e75f5d2ca4acb6a2448420bccea5a0e (patch)
tree2044393c0a20a45a9520a89e2d8ff7b43b39eb2b /util-src/pposix.c
parentfaffced19df759783f4463e91ec1f0c7dd434914 (diff)
downloadprosody-53c20a796e75f5d2ca4acb6a2448420bccea5a0e.tar.gz
prosody-53c20a796e75f5d2ca4acb6a2448420bccea5a0e.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/pposix.c')
-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()) {