]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Allow zip reader to build on platforms that lack zlib.
authorTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 19:03:21 +0000 (14:03 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 19:03:21 +0000 (14:03 -0500)
However, this breaks reading non-compressed zip entries as well.
Submitted by: Ivailo Petrov

SVN-Revision: 252

libarchive/archive_read_support_format_zip.c

index a22eaa0a3fda9765ef76e3beb05227c534dc3c8c..1d7187f434693cfeda3d4d5c5c1402b86f401d0f 100644 (file)
@@ -36,6 +36,10 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.27
 #include <time.h>
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
+#else
+/* Hmmm... This is necessary, but means that we can't correctly extract
+ * even uncompressed entries on platforms that lack zlib. */
+#define        crc32(crc, buf, len) (unsigned long)0
 #endif
 
 #include "archive.h"