diff --git a/libretro-common/formats/png/Makefile b/libretro-common/formats/png/Makefile index ea41c8c7cf..ed00d89b45 100644 --- a/libretro-common/formats/png/Makefile +++ b/libretro-common/formats/png/Makefile @@ -1,6 +1,6 @@ TARGET := rpng -SOURCES := $(wildcard *.c) ../../file/memory_stream.c +SOURCES := $(wildcard *.c) OBJS := $(SOURCES:.c=.o) CFLAGS += -Wall -pedantic -std=gnu99 -O0 -g -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DRPNG_TEST -I../../include diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index 80344edbf5..cec638e055 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -32,16 +32,6 @@ #include #endif -#ifdef RARCH_INTERNAL -#include "../../../hash.h" -#else - -static inline uint32_t crc32_calculate(const uint8_t *data, size_t length) -{ - return crc32(0, data, length); -} -#endif - #undef GOTO_END_ERROR #define GOTO_END_ERROR() do { \ fprintf(stderr, "[RPNG]: Error in line %d.\n", __LINE__); \ @@ -829,7 +819,7 @@ static void dword_write_be(uint8_t *buf, uint32_t val) static bool png_write_crc(FILE *file, const uint8_t *data, size_t size) { - uint32_t crc = crc32_calculate(data, size); + uint32_t crc = crc32(0, data, size); uint8_t crc_raw[4] = {0}; dword_write_be(crc_raw, crc); return fwrite(crc_raw, 1, sizeof(crc_raw), file) == sizeof(crc_raw);