diff --git a/core/cd_hw/libchdr/deps/libFLAC/include/private/macros.h b/core/cd_hw/libchdr/deps/libFLAC/include/private/macros.h index a5d9a90..becc59f 100644 --- a/core/cd_hw/libchdr/deps/libFLAC/include/private/macros.h +++ b/core/cd_hw/libchdr/deps/libFLAC/include/private/macros.h @@ -50,6 +50,7 @@ /* Whatever other unix that has sys/param.h */ #elif defined(HAVE_SYS_PARAM_H) +#include #define flac_max(a,b) MAX(a,b) #define flac_min(a,b) MIN(a,b) diff --git a/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h b/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h index 2083f3a..4f33bc1 100644 --- a/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h +++ b/core/cd_hw/libchdr/deps/libFLAC/include/share/compat.h @@ -144,7 +144,7 @@ # endif #endif /* defined _MSC_VER */ -#ifdef _WIN32 +#if defined(_WIN32) && defined(NEED_UTF8_SUPPORT) /* All char* strings are in UTF-8 format. Added to support Unicode files on Windows */ #include "share/win_utf8_io.h" @@ -175,7 +175,7 @@ #endif -#ifdef _WIN32 +#if defined _MSC_VER #define flac_stat_s __stat64 /* stat struct */ #define flac_fstat _fstat64 #else diff --git a/core/cd_hw/libchdr/deps/libFLAC/stream_decoder.c b/core/cd_hw/libchdr/deps/libFLAC/stream_decoder.c index 7c8a26e..d364b0c 100644 --- a/core/cd_hw/libchdr/deps/libFLAC/stream_decoder.c +++ b/core/cd_hw/libchdr/deps/libFLAC/stream_decoder.c @@ -3356,11 +3356,7 @@ FLAC__StreamDecoderSeekStatus file_seek_callback_(const FLAC__StreamDecoder *dec if(decoder->private_->file == stdin) return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED; -#ifdef __CELLOS_LV2__ - else if(fseek(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0) -#else else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0) -#endif return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR; else return FLAC__STREAM_DECODER_SEEK_STATUS_OK; @@ -3373,11 +3369,7 @@ FLAC__StreamDecoderTellStatus file_tell_callback_(const FLAC__StreamDecoder *dec if(decoder->private_->file == stdin) return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED; -#ifdef __CELLOS_LV2__ - else if((pos = ftell(decoder->private_->file)) < 0) -#else else if((pos = ftello(decoder->private_->file)) < 0) -#endif return FLAC__STREAM_DECODER_TELL_STATUS_ERROR; else { *absolute_byte_offset = (FLAC__uint64)pos;