From 6d49ccf97896fb433a22996f44554c8583ddbaed Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 25 Mar 2017 01:26:21 +0100 Subject: [PATCH] (zlib) Update adler32 --- deps/zlib/adler32.c | 4 +--- libretro-common/include/compat/zlib.h | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deps/zlib/adler32.c b/deps/zlib/adler32.c index a7abb77725..67d6030f95 100644 --- a/deps/zlib/adler32.c +++ b/deps/zlib/adler32.c @@ -8,7 +8,6 @@ #define ZLIB_INTERNAL #include #include -#include #define BASE 65521UL /* largest prime smaller than 65536 */ #define NMAX 5552 @@ -46,7 +45,7 @@ #endif /* ========================================================================= */ -uLong adler32(uLong adler, const Bytef *buf, uInt len) +uint32_t adler32(uint32_t adler, const uint8_t *buf, size_t len) { uint32_t s1 = adler & 0xffff; uint32_t s2 = (adler >> 16) & 0xffff; @@ -72,4 +71,3 @@ uLong adler32(uLong adler, const Bytef *buf, uInt len) } return (s2 << 16) | s1; } - diff --git a/libretro-common/include/compat/zlib.h b/libretro-common/include/compat/zlib.h index 894c8c05d5..43edeabfd8 100644 --- a/libretro-common/include/compat/zlib.h +++ b/libretro-common/include/compat/zlib.h @@ -40,6 +40,7 @@ #ifndef ZLIB_H #define ZLIB_H +#include #include "zconf.h" #ifdef __cplusplus @@ -1575,7 +1576,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); library. */ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +uint32_t adler32 (uint32_t adler, const uint8_t *buf, size_t len); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. If buf is Z_NULL, this function returns the