[gtk/gtk-3-24: 1/2] gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf



commit 8809fab111fb64b2188f07cc61545e955dfd2ebb
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Mon Aug 26 20:13:48 2019 +0200

    gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf
    
    With the switch to meson we no longer built with _FILE_OFFSET_BITS which
    results in fstat being the 32 bit variant, not matching GStatBuf, which is
    _stat64 on 64bit mingw builds.
    
    This makes things use _fstat64 in this case, to match GStatBuf.

 gtk/gtkiconcache.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index 478efc0e7a..b36ccc2a7c 100644
--- a/gtk/gtkiconcache.c
+++ b/gtk/gtkiconcache.c
@@ -111,6 +111,9 @@ _gtk_icon_cache_new_for_path (const gchar *path)
 #if ((_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800) || defined (__MINGW64_VERSION_MAJOR)) && 
!defined(_WIN64)
 #undef fstat /* Just in case */
 #define fstat _fstat32  
+#elif defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64)
+#undef fstat
+#define fstat _fstat64
 #endif
 #endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]