blob: e9b23749d911cebe0aacd21c72eaeb9b77444fd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
From da456618e693be27ba6ddf56cef579895fa1d9c5 Mon Sep 17 00:00:00 2001
From: kristaps <>
Date: Sun, 30 Oct 2016 19:25:17 +0000
Subject: [PATCH] Portability: on Linux, setlinebuf doesn't wrap directly
around setvbuf. Noted on https://github.com/kristapsdz/kcgi/pull/10 --
thanks!
---
logging.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/logging.c b/logging.c
index f06e7a6..831b935 100644
--- a/logging.c
+++ b/logging.c
@@ -103,7 +103,7 @@ kutil_openlog(const char *file)
if (NULL != file && NULL == freopen(file, "a", stderr))
return(0);
- return(EOF != setlinebuf(stderr));
+ return(EOF != setvbuf(stderr, NULL, _IOLBF, 0));
}
void
|