From b028e08d353f18d23c6b81d4ef260b1954adae72 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Fri, 13 Jul 2001 06:43:03 +0000 Subject: 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. --- tar.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tar.c') diff --git a/tar.c b/tar.c index 31443ee22..cf65798ff 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"); } -- cgit v1.2.3