summaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2001-07-13 06:43:03 +0000
committerGlenn L McGrath2001-07-13 06:43:03 +0000
commitb028e08d353f18d23c6b81d4ef260b1954adae72 (patch)
treec00537b1d8474c837312818bc48f6b822e8fb4d1 /tar.c
parent7467c8d3b6a50e2cbd8db750963d40b420ad38d1 (diff)
downloadbusybox-b028e08d353f18d23c6b81d4ef260b1954adae72.zip
busybox-b028e08d353f18d23c6b81d4ef260b1954adae72.tar.gz
Move setvbuf calls from gz_open() to calling functions, setvbuf is only supposed to be called prior to opening the stream, glibc tolerates later use, uclibc doesnt.
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tar.c b/tar.c
index 31443ee..cf65798 100644
--- a/tar.c
+++ b/tar.c
@@ -284,6 +284,10 @@ extern int tar_main(int argc, char **argv)
/* unzip tarFd in a seperate process */
if (unzipFlag == TRUE) {
comp_file = fdopen(tarFd, "r");
+
+ /* set the buffer size */
+ setvbuf(comp_file, NULL, _IOFBF, 0x8000);
+
if ((tarFd = fileno(gz_open(comp_file, &pid))) == EXIT_FAILURE) {
error_msg_and_die("Couldnt unzip file");
}