diff --git a/libs/fst/00_PATCH_win_io.patch b/libs/fst/00_PATCH_win_io.patch index 5813758cd..1105538e5 100644 --- a/libs/fst/00_PATCH_win_io.patch +++ b/libs/fst/00_PATCH_win_io.patch @@ -9,3 +9,32 @@ #include #else #include +--- fstapi.cc ++++ fstapi.cc +@@ -56,7 +56,7 @@ + #include + #endif + +-#ifdef __MINGW32__ ++#if defined __CYGWIN__ || defined __MINGW32__ || defined _MSC_VER + #define WIN32_LEAN_AND_MEAN + #include + #endif +@@ -159,7 +159,7 @@ void **JenkinsIns(void *base_i, const unsigned char *mem, uint32_t length, uint3 + /*** ***/ + /***********************/ + +-#ifdef __MINGW32__ ++#if defined(__MINGW32__) || defined(_MSC_VER) + #include + #ifndef HAVE_FSEEKO + #define ftello _ftelli64 +@@ -341,7 +341,7 @@ return(NULL); + /* + * mmap compatibility + */ +-#if defined __MINGW32__ ++#if defined __CYGWIN__ || defined __MINGW32__ || defined _MSC_VER + #include + #define fstMmap(__addr,__len,__prot,__flags,__fd,__off) fstMmap2((__len), (__fd), (__off)) + #define fstMunmap(__addr,__len) UnmapViewOfFile((LPCVOID)__addr) diff --git a/libs/fst/fstapi.cc b/libs/fst/fstapi.cc index 3b0b35233..00a304909 100644 --- a/libs/fst/fstapi.cc +++ b/libs/fst/fstapi.cc @@ -56,7 +56,7 @@ #include #endif -#ifdef __MINGW32__ +#if defined __CYGWIN__ || defined __MINGW32__ || defined _MSC_VER #define WIN32_LEAN_AND_MEAN #include #endif @@ -159,7 +159,7 @@ void **JenkinsIns(void *base_i, const unsigned char *mem, uint32_t length, uint3 /*** ***/ /***********************/ -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(_MSC_VER) #include #ifndef HAVE_FSEEKO #define ftello _ftelli64 @@ -341,7 +341,7 @@ return(NULL); /* * mmap compatibility */ -#if defined __MINGW32__ +#if defined __CYGWIN__ || defined __MINGW32__ || defined _MSC_VER #include #define fstMmap(__addr,__len,__prot,__flags,__fd,__off) fstMmap2((__len), (__fd), (__off)) #define fstMunmap(__addr,__len) UnmapViewOfFile((LPCVOID)__addr)