From 91946b783499479fe65955bdad7865fd967934ea Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sun, 8 Jun 2014 19:54:49 +0000 Subject: Fixed FTBFS when compiling with zlib versions < 1.2.70 (sammyx) --- src/minizip/ioapi.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/minizip/ioapi.h') diff --git a/src/minizip/ioapi.h b/src/minizip/ioapi.h index e4462b8..a531284 100644 --- a/src/minizip/ioapi.h +++ b/src/minizip/ioapi.h @@ -67,6 +67,24 @@ #endif #endif +/* As reported by sammyx, z_crc_t and z_const are not defined in pre-1.2.70 releases of zlib */ +/* See */ +#if ZLIB_VERNUM < 0x1270 + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#endif + /* #ifndef ZPOS64_T #ifdef _WIN32 -- cgit v1.2.3