diff --git a/src/compat/internal.h b/src/compat/internal.h index 43ff62d..551212b 100644 --- a/src/compat/internal.h +++ b/src/compat/internal.h @@ -30,7 +30,15 @@ # undef _WIN32_WINNT # define _WIN32_WINNT 0x0502 # include +# if defined(__MINGW32__) || defined(__MINGW64__) +# define off_t _off_t +# define off64_t _off64_t +# endif # include +# if defined(__MINGW32__) || defined(__MINGW64__) +# undef off_t +# undef off64_t +# endif # include # include # include diff --git a/src/compat/posix.h b/src/compat/posix.h index 043562d..fc0e8d8 100644 --- a/src/compat/posix.h +++ b/src/compat/posix.h @@ -40,7 +40,15 @@ # define _POSIX_SOURCE 1 # define TMP_POSIX # endif +# if defined(__MINGW32__) || defined(__MINGW64__) +# define off_t _off_t +# define off64_t _off64_t +# endif # include +# if defined(__MINGW32__) || defined(__MINGW64__) +# undef off_t +# undef off64_t +# endif # ifdef TMP_POSIX # undef _POSIX_SOURCE # undef TMP_POSIX