From 10903f1b32ef7b4448f2a1e3aa42953e00a3839e Mon Sep 17 00:00:00 2001 From: shermp <14854761+shermp@users.noreply.github.com> Date: Thu, 19 Nov 2020 11:42:33 +1300 Subject: [PATCH] More cross-platform stdio fixes --- src/minivhd_util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/minivhd_util.c b/src/minivhd_util.c index edede96..5bfc599 100644 --- a/src/minivhd_util.c +++ b/src/minivhd_util.c @@ -255,7 +255,9 @@ int64_t mvhd_ftello64(FILE* stream) { #ifdef _MSC_VER return _ftelli64(stream); -#else +#elif defined(__MINGW32__) + return ftello64(stream); +#else /* This should work with linux (with _FILE_OFFSET_BITS), and hopefully OS X and BSD */ return ftello(stream); #endif } @@ -264,7 +266,9 @@ int mvhd_fseeko64(FILE* stream, int64_t offset, int origin) { #ifdef _MSC_VER return _fseeki64(stream, offset, origin); -#else +#elif defined(__MINGW32__) + return fseeko64(stream, offset, origin); +#else /* This should work with linux (with _FILE_OFFSET_BITS), and hopefully OS X and BSD */ return fseeko(stream, offset, origin); #endif }