diff --git a/configure.ac b/configure.ac index c8c4714c..b35e44d8 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,7 @@ case "$host" in *-*-cygwin|*mingw*|*emx*) # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2 LT_NO_UNDEFINED="-no-undefined" + CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS" os_is_windows=yes ;; *) diff --git a/include/share/compat.h b/include/share/compat.h index 98eec559..88caf1ee 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -175,7 +175,7 @@ #endif #ifdef _WIN32 -#define flac_stat_s _stat64 /* stat struct */ +#define flac_stat_s __stat64 /* stat struct */ #define flac_fstat _fstat64 #else #define flac_stat_s stat /* stat struct */ diff --git a/include/share/win_utf8_io.h b/include/share/win_utf8_io.h index 598f187f..b48e85ee 100644 --- a/include/share/win_utf8_io.h +++ b/include/share/win_utf8_io.h @@ -20,7 +20,7 @@ int vfprintf_utf8(FILE *stream, const char *format, va_list argptr); FILE *fopen_utf8(const char *filename, const char *mode); int stat_utf8(const char *path, struct stat *buffer); -int _stat64_utf8(const char *path, struct _stat64 *buffer); +int _stat64_utf8(const char *path, struct __stat64 *buffer); int chmod_utf8(const char *filename, int pmode); int utime_utf8(const char *filename, struct utimbuf *times); int unlink_utf8(const char *filename); diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index 12cfd977..4b78790d 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -182,7 +182,7 @@ FILE *fopen_utf8(const char *filename, const char *mode) return f; } -int _stat64_utf8(const char *path, struct _stat64 *buffer) +int _stat64_utf8(const char *path, struct __stat64 *buffer) { wchar_t *wpath; int ret;