mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Call setvbuf from here isntead of gz_open for compatability with uclibc
This commit is contained in:
parent
b028e08d35
commit
26a0d9a945
@ -74,6 +74,8 @@ extern int rpm2cpio_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
rpmfile = fopen(argv[1], "r");
|
rpmfile = fopen(argv[1], "r");
|
||||||
if (!rpmfile) perror_msg_and_die("Can't open rpm file");
|
if (!rpmfile) perror_msg_and_die("Can't open rpm file");
|
||||||
|
/* set the buffer size */
|
||||||
|
setvbuf(rpmfile, NULL, _IOFBF, 0x8000);
|
||||||
}
|
}
|
||||||
|
|
||||||
fread (&lead, sizeof(struct rpm_lead), 1, rpmfile);
|
fread (&lead, sizeof(struct rpm_lead), 1, rpmfile);
|
||||||
@ -85,6 +87,7 @@ extern int rpm2cpio_main(int argc, char **argv)
|
|||||||
skip_header(rpmfile);
|
skip_header(rpmfile);
|
||||||
|
|
||||||
cpiofile = gz_open(rpmfile, &gunzip_pid);
|
cpiofile = gz_open(rpmfile, &gunzip_pid);
|
||||||
|
|
||||||
copyfd(fileno(cpiofile), fileno(stdout));
|
copyfd(fileno(cpiofile), fileno(stdout));
|
||||||
gz_close(gunzip_pid);
|
gz_close(gunzip_pid);
|
||||||
fclose(rpmfile);
|
fclose(rpmfile);
|
||||||
|
@ -74,6 +74,8 @@ extern int rpm2cpio_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
rpmfile = fopen(argv[1], "r");
|
rpmfile = fopen(argv[1], "r");
|
||||||
if (!rpmfile) perror_msg_and_die("Can't open rpm file");
|
if (!rpmfile) perror_msg_and_die("Can't open rpm file");
|
||||||
|
/* set the buffer size */
|
||||||
|
setvbuf(rpmfile, NULL, _IOFBF, 0x8000);
|
||||||
}
|
}
|
||||||
|
|
||||||
fread (&lead, sizeof(struct rpm_lead), 1, rpmfile);
|
fread (&lead, sizeof(struct rpm_lead), 1, rpmfile);
|
||||||
@ -85,6 +87,7 @@ extern int rpm2cpio_main(int argc, char **argv)
|
|||||||
skip_header(rpmfile);
|
skip_header(rpmfile);
|
||||||
|
|
||||||
cpiofile = gz_open(rpmfile, &gunzip_pid);
|
cpiofile = gz_open(rpmfile, &gunzip_pid);
|
||||||
|
|
||||||
copyfd(fileno(cpiofile), fileno(stdout));
|
copyfd(fileno(cpiofile), fileno(stdout));
|
||||||
gz_close(gunzip_pid);
|
gz_close(gunzip_pid);
|
||||||
fclose(rpmfile);
|
fclose(rpmfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user