- (bal) Updates from the Sony NEWS-OS platform by NAKAJI Hiroyuki
   <nakaji@tutrp.tut.ac.jp>
diff --git a/sftp-int.c b/sftp-int.c
index 46e405e..03b2299 100644
--- a/sftp-int.c
+++ b/sftp-int.c
@@ -889,8 +889,13 @@
 			return;
 		}
 	}
+#if HAVE_SETVBUF
 	setvbuf(stdout, NULL, _IOLBF, 0);
 	setvbuf(infile, NULL, _IOLBF, 0);
+#else
+	setlinebuf(stdout);
+	setlinebuf(infile);
+#endif
 
 	for(;;) {
 		char *cp;