Skip to content

Commit

Permalink
fix z_size_t not defined in CentOS #1337
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Jul 5, 2024
1 parent f43e1e5 commit 2eb44af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Core/crc32/Checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ uLong crc32(uLong crc, const Bytef *buf, z_size_t len);
#else // MMKV_EMBED_ZLIB

# include <zlib.h>

// some old version of zlib doesn't define z_size_t
# ifndef z_size_t
typedef size_t z_size_t;
# endif
# define ZLIB_CRC32(crc, buf, len) ::crc32(crc, buf, static_cast<uInt>(len))

#endif // MMKV_EMBED_ZLIB
Expand Down

0 comments on commit 2eb44af

Please sign in to comment.