From cc97b763045ecc5a813c13f563c373390588e7d3 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Fri, 7 Sep 2018 15:25:33 +0200
Subject: 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
---
 util-src/pposix.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'util-src')

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()) {
-- 
cgit v1.2.3