diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-11-07 16:20:59 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-11-07 16:20:59 +0900 |
commit | 48595599dbfe57e2f8581925ee0f75deb968d6b0 (patch) | |
tree | 24f54bdaf861af3006e5c5cebbf9c47fa6546977 /libarchive/archive_write_add_filter_gzip.c | |
parent | bd8e3d85b1b19f34af271b9c7979b2e44fbb4520 (diff) | |
download | libarchive-48595599dbfe57e2f8581925ee0f75deb968d6b0.tar.gz |
Fix build failure with zlib on Win64.
Diffstat (limited to 'libarchive/archive_write_add_filter_gzip.c')
-rw-r--r-- | libarchive/archive_write_add_filter_gzip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libarchive/archive_write_add_filter_gzip.c b/libarchive/archive_write_add_filter_gzip.c index 1a724674..da4607bb 100644 --- a/libarchive/archive_write_add_filter_gzip.c +++ b/libarchive/archive_write_add_filter_gzip.c @@ -211,7 +211,7 @@ archive_compressor_gzip_open(struct archive_write_filter *f) data->crc = crc32(0L, NULL, 0); data->stream.next_out = data->compressed; - data->stream.avail_out = data->compressed_buffer_size; + data->stream.avail_out = (uInt)data->compressed_buffer_size; /* Prime output buffer with a gzip header. */ data->compressed[0] = 0x1f; /* GZip signature bytes */ @@ -282,12 +282,12 @@ archive_compressor_gzip_write(struct archive_write_filter *f, const void *buff, int ret; /* Update statistics */ - data->crc = crc32(data->crc, (const Bytef *)buff, length); + data->crc = crc32(data->crc, (const Bytef *)buff, (uInt)length); data->total_in += length; /* Compress input data to output buffer */ SET_NEXT_IN(data, buff); - data->stream.avail_in = length; + data->stream.avail_in = (uInt)length; if ((ret = drive_compressor(f, data, 0)) != ARCHIVE_OK) return (ret); @@ -358,7 +358,8 @@ drive_compressor(struct archive_write_filter *f, if (ret != ARCHIVE_OK) return (ARCHIVE_FATAL); data->stream.next_out = data->compressed; - data->stream.avail_out = data->compressed_buffer_size; + data->stream.avail_out = + (uInt)data->compressed_buffer_size; } /* If there's nothing to do, we're done. */ |