summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-11-26 18:34:51 +0000
committermillert <millert@openbsd.org>2014-11-26 18:34:51 +0000
commitb9a887b60dfe0bcd4be9bbd84cc3b6ef94586b9f (patch)
tree69fcd75ffe77994b2e1cb6398698e26414665990 /usr.bin/patch/patch.c
parentMake caretx a perl dependency, not just miniperl (diff)
downloadwireguard-openbsd-b9a887b60dfe0bcd4be9bbd84cc3b6ef94586b9f.tar.xz
wireguard-openbsd-b9a887b60dfe0bcd4be9bbd84cc3b6ef94586b9f.zip
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index fba035c33bd..dbd97c6a2ac 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: patch.c,v 1.51 2013/11/26 13:19:07 deraadt Exp $ */
+/* $OpenBSD: patch.c,v 1.52 2014/11/26 18:34:51 millert Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -147,8 +147,8 @@ main(int argc, char *argv[])
const char *tmpdir;
char *v;
- setlinebuf(stdout);
- setlinebuf(stderr);
+ setvbuf(stdout, NULL, _IOLBF, 0);
+ setvbuf(stderr, NULL, _IOLBF, 0);
for (i = 0; i < MAXFILEC; i++)
filearg[i] = NULL;