summarylogtreecommitdiffstats
path: root/fix-kutil_openlog.patch
diff options
context:
space:
mode:
Diffstat (limited to 'fix-kutil_openlog.patch')
-rw-r--r--fix-kutil_openlog.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/fix-kutil_openlog.patch b/fix-kutil_openlog.patch
new file mode 100644
index 000000000000..e9b23749d911
--- /dev/null
+++ b/fix-kutil_openlog.patch
@@ -0,0 +1,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