]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
If libarchive is built without ZLib support, try to use an external "gunzip"
authorTim Kientzle <kientzle@gmail.com>
Sun, 8 Feb 2009 04:43:04 +0000 (23:43 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 8 Feb 2009 04:43:04 +0000 (23:43 -0500)
program instead of just giving up.

SVN-Revision: 585

libarchive/archive_read_support_compression_gzip.c

index 756994d8cc6aea0e80934b4f1a70ec76bfc664bd..80619bc415943e4c11c6734bbf5e346b8fbc5705 100644 (file)
@@ -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