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.

This commit is contained in:
Glenn L McGrath
2001-07-13 06:43:03 +00:00
parent 7467c8d3b6
commit b028e08d35
5 changed files with 17 additions and 0 deletions

View File

@ -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) {