From: Tim Kientzle Date: Sun, 8 Feb 2009 04:43:04 +0000 (-0500) Subject: If libarchive is built without ZLib support, try to use an external "gunzip" X-Git-Tag: v2.7.0~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=992eb5f681fe084030df69bae2273e336f2a7fbb;p=thirdparty%2Flibarchive.git If libarchive is built without ZLib support, try to use an external "gunzip" program instead of just giving up. SVN-Revision: 585 --- diff --git a/libarchive/archive_read_support_compression_gzip.c b/libarchive/archive_read_support_compression_gzip.c index 756994d8c..80619bc41 100644 --- a/libarchive/archive_read_support_compression_gzip.c +++ b/libarchive/archive_read_support_compression_gzip.c @@ -212,12 +212,14 @@ gzip_bidder_bid(struct archive_read_filter_bidder *self, * and emit a useful message. */ static int -gzip_bidder_init(struct archive_read_filter *filter) +gzip_bidder_init(struct archive_read_filter *self) { + int r; - archive_set_error(&filter->archive->archive, -1, - "This version of libarchive was compiled without gzip support"); - return (ARCHIVE_FATAL); + r = __archive_read_program(self, "gunzip"); + self->code = ARCHIVE_COMPRESSION_GZIP; + self->name = "gzip"; + return (r); } #else