diff options
author | Christian Federmann <cfedermann@gmail.com> | 2012-05-09 22:55:55 +0400 |
---|---|---|
committer | Christian Federmann <cfedermann@gmail.com> | 2012-05-09 22:55:55 +0400 |
commit | d9e77ed5b1676956978e221427c8c39f372e7612 (patch) | |
tree | 10e448dabd02c6dcb5ff33f617bd3e4184551aa3 /util | |
parent | 05909cc7f402e3c1e36dc58d503440b627582f77 (diff) |
Implicit casting from FILE* to gzFile_s* does not work anymore since gzFile has been changed from void * to gzFile_s * in zlib-1.2.6.
Diffstat (limited to 'util')
-rw-r--r-- | util/file_piece.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/file_piece.cc b/util/file_piece.cc index f0d49d555..d8a1ee8da 100644 --- a/util/file_piece.cc +++ b/util/file_piece.cc @@ -31,7 +31,7 @@ ParseNumberException::ParseNumberException(StringPiece value) throw() { GZException::GZException(void *file) { #ifdef HAVE_ZLIB int num; - *this << gzerror(file, &num) << " from zlib"; + *this << gzerror((gzFile)file, &num) << " from zlib"; #endif // HAVE_ZLIB } @@ -56,7 +56,7 @@ FilePiece::~FilePiece() { // zlib took ownership file_.release(); int ret; - if (Z_OK != (ret = gzclose(gz_file_))) { + if (Z_OK != (ret = gzclose((gzFile)gz_file_))) { std::cerr << "could not close file " << file_name_ << " using zlib" << std::endl; abort(); } @@ -295,7 +295,7 @@ void FilePiece::ReadShift() { ssize_t read_return; #ifdef HAVE_ZLIB - read_return = gzread(gz_file_, static_cast<char*>(data_.get()) + already_read, default_map_size_ - already_read); + read_return = gzread((gzFile)gz_file_, static_cast<char*>(data_.get()) + already_read, default_map_size_ - already_read); if (read_return == -1) throw GZException(gz_file_); if (total_size_ != kBadSize) { // Just get the position, don't actually seek. Apparently this is how you do it. . . |