summaryrefslogtreecommitdiff
path: root/libbb/unarchive.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 /libbb/unarchive.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 'libbb/unarchive.c')
-rw-r--r--libbb/unarchive.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index 5c5bb49..80dddb2 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -568,6 +568,9 @@ char *deb_extract(const char *package_filename, FILE *out_stream,
/* open the debian package to be worked on */
deb_stream = wfopen(package_filename, "r");
+ /* set the buffer size */
+ setvbuf(deb_stream, NULL, _IOFBF, 0x8000);
+
/* check ar magic */
fread(ar_magic, 1, 8, deb_stream);
if (strncmp(ar_magic,"!<arch>",7) != 0) {