summaryrefslogtreecommitdiff
path: root/src/opusfile-0.2
diff options
context:
space:
mode:
authorJames Canete <use.less01@gmail.com>2013-02-18 19:00:41 -0600
committerTim Angus <tim@ngus.net>2013-03-19 16:41:13 +0000
commita222f7bd2baa8228100a4f5e6e292f0c75abafa5 (patch)
tree3dca7161fe7d9b105a6f39e338640b0acbe618e8 /src/opusfile-0.2
parent6130089d0468a7cffa7f966072fd69cba397538f (diff)
Fix compiling opusfile on mingw32
Diffstat (limited to 'src/opusfile-0.2')
-rw-r--r--src/opusfile-0.2/src/stream.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/opusfile-0.2/src/stream.c b/src/opusfile-0.2/src/stream.c
index 5482ca56..868b2d51 100644
--- a/src/opusfile-0.2/src/stream.c
+++ b/src/opusfile-0.2/src/stream.c
@@ -54,7 +54,9 @@ static int op_fread(void *_stream,unsigned char *_ptr,int _buf_size){
}
static int op_fseek(void *_stream,opus_int64 _offset,int _whence){
-#if defined(_MSC_VER) || defined(_WIN32)
+#if defined(__MINGW32__)
+ return fseeko64((FILE *)_stream,_offset,_whence);
+#elif defined(_MSC_VER)
return _fseeki64((FILE *)_stream,_offset,_whence);
#else
return fseeko((FILE *)_stream,(off_t)_offset,_whence);
@@ -62,7 +64,9 @@ static int op_fseek(void *_stream,opus_int64 _offset,int _whence){
}
static opus_int64 op_ftell(void *_stream){
-#if defined(_MSC_VER) || defined(_WIN32)
+#if defined(__MINGW32__)
+ return ftello64((FILE *)_stream);
+#elif defined(_MSC_VER)
return _ftelli64((FILE *)_stream);
#else
return ftello((FILE *)_stream);