From 5c771f2a8f597c18a2e9c66f25e080ff74fd1130 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 9 Mar 2017 22:41:55 +0000 Subject: [PATCH] snd_flac.c: removed unnecessary metadata.h include. fixed build and run against legacy flac <= 1.1.2 with LP64 systems. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1381 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/snd_flac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quakespasm/Quake/snd_flac.c b/quakespasm/Quake/snd_flac.c index 8ce1c1e6..b53f7435 100644 --- a/quakespasm/Quake/snd_flac.c +++ b/quakespasm/Quake/snd_flac.c @@ -31,12 +31,11 @@ #undef LEGACY_FLAC #include -/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */ +/* FLAC >= 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */ #if !defined(FLAC_API_VERSION_CURRENT) || ((FLAC_API_VERSION_CURRENT+0) < 8) #define LEGACY_FLAC #include #endif -#include #ifdef LEGACY_FLAC #define FLAC__StreamDecoder FLAC__SeekableStreamDecoder @@ -63,6 +62,9 @@ #define FLAC__STREAM_DECODER_TELL_STATUS_OK FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK #define FLAC__STREAM_DECODER_TELL_STATUS_ERROR FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR #define FLAC__STREAM_DECODER_LENGTH_STATUS_OK FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK +typedef unsigned FLAC_size_t; +#else +typedef size_t FLAC_size_t; #endif typedef struct { @@ -85,7 +87,7 @@ flac_error_func (const FLAC__StreamDecoder *decoder, static FLAC__StreamDecoderReadStatus flac_read_func (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], - size_t *bytes, void *client_data) + FLAC_size_t *bytes, void *client_data) { flacfile_t *ff = (flacfile_t *) client_data; if (*bytes > 0)