]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix gzip/bzip2 support compiling on platforms that lack zlib/bzlib.
authorTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 18:53:33 +0000 (13:53 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 18:53:33 +0000 (13:53 -0500)
Submitted by: Ivailo Petrov

SVN-Revision: 248

libarchive/archive_read_support_compression_bzip2.c
libarchive/archive_read_support_compression_gzip.c

index e60ec68de095ae86ee062b52d7bcb54f9ad0fb85..e6319f1f2a35856db2aa78453dd0928e0b949e76 100644 (file)
@@ -171,7 +171,7 @@ bzip2_reader_bid(struct archive_reader *self, const void *buff, size_t len)
  * decompression.  We can, however, still detect compressed archives
  * and emit a useful message.
  */
-static int
+static struct archive_read_source *
 bzip2_reader_init(struct archive_read *a, struct archive_reader *reader,
     struct archive_read_source *upstream, const void *buff, size_t n)
 {
@@ -183,7 +183,7 @@ bzip2_reader_init(struct archive_read *a, struct archive_reader *reader,
 
        archive_set_error(&a->archive, -1,
            "This version of libarchive was compiled without bzip2 support");
-       return (ARCHIVE_FATAL);
+       return (NULL);
 }
 
 
index 2066d0975952bf8a508a64adf5a85d7c7a9b8f05..1df82d7dfc61764cd6d034e14758f4b32d83e97b 100644 (file)
@@ -163,9 +163,9 @@ gzip_reader_bid(struct archive_reader *self, const void *buff, size_t len)
  * decompression.  We can, however, still detect compressed archives
  * and emit a useful message.
  */
-static int
-gzip_reader_init(struct archive_read *a, struct archive_read_source *upstream,
-    const void *buff, size_t n)
+static struct archive_read_source *
+gzip_reader_init(struct archive_read *a, struct archive_reader *reader,
+    struct archive_read_source *upstream, const void *buff, size_t n)
 {
        (void)a;        /* UNUSED */
        (void)buff;     /* UNUSED */
@@ -173,7 +173,7 @@ gzip_reader_init(struct archive_read *a, struct archive_read_source *upstream,
 
        archive_set_error(&a->archive, -1,
            "This version of libarchive was compiled without gzip support");
-       return (ARCHIVE_FATAL);
+       return (NULL);
 }
 
 #else