diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-06-08 19:54:49 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-06-08 19:54:49 +0000 |
commit | 91946b783499479fe65955bdad7865fd967934ea (patch) | |
tree | c9cc75ef1b27f5d17243d27f91c2c86f659c3546 /src/minizip/ioapi.h | |
parent | 1af7fd8c5d836429ee05bf4373ea077a6b5377c0 (diff) |
Fixed FTBFS when compiling with zlib versions < 1.2.70 (sammyx)
Diffstat (limited to 'src/minizip/ioapi.h')
-rw-r--r-- | src/minizip/ioapi.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <https://github.com/madler/zlib/commit/6c9bd474aa08312ef2e2e9655a80e18db24a1680#diff-d466aa66f7e453e0c8a7719229cff391R391> */ +#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 |