diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -23,9 +23,11 @@ #include "gzip.h" #include "ustar.h" +#define OPKG_OPK_MAIN_FILE_BUFFER_SIZE_ 8192 + struct _opkg_opk_main_file { FILE *file; - char buffer[8192]; + char buffer[OPKG_OPK_MAIN_FILE_BUFFER_SIZE_]; }; static int @@ -34,7 +36,8 @@ _opkg_opk_main_file_read(void *user_data, char **buffer, size_t *size) struct _opkg_opk_main_file *file = user_data; *buffer = file->buffer; - *size = fread(file->buffer, 1, 8192, file->file); + *size = fread(file->buffer, 1, OPKG_OPK_MAIN_FILE_BUFFER_SIZE_, + file->file); if (feof(file->file)) { return OPKG_OPK_END; } else if (ferror(file->file) || *size == 0) { |