about summary refs log tree commit diff
path: root/src/stdio/setlinebuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/setlinebuf.c')
-rw-r--r--src/stdio/setlinebuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stdio/setlinebuf.c b/src/stdio/setlinebuf.c
new file mode 100644
index 00000000..b93c4d6a
--- /dev/null
+++ b/src/stdio/setlinebuf.c
@@ -0,0 +1,7 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+
+void setlinebuf(FILE *f)
+{
+	setvbuf(f, 0, _IOLBF, 0);
+}