gstdio: use _stat64 for GStatBuf on 64bit mingw. Fixes #1476

The size of stat depends on various macros on Windows which leads to
the problem of size mismatches when glib is built with a different configuration
than a program using it.

For example the autotools build defaults to _FILE_OFFSET_BITS=64 and a program
not defining  _FILE_OFFSET_BITS will allocate a too small struct on the stack,
leading to stack corruption when glib writes to it.

To make the size the user sees always match the default mingw build define GStatBuf
as _stat64 (same as _FILE_OFFSET_BITS=64) under mingw+64bit.
diff --git a/NEWS b/NEWS
index 9794c44..2ce4e13 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+Overview of changes in GLib 2.57.3
+==================================
+
+* MinGW-w64 ABI warning: In case you build 64 bit glib without LFS support by
+  passing --disable-largefile (not the default) and use GStatBuf, you need to
+  rebuild your application as the size of GStatBuf has changed for this case.
+  See #1476
+
+
 Overview of changes in GLib 2.57.2
 ==================================
 
diff --git a/glib/gstdio.h b/glib/gstdio.h
index 15091b3..94f4fa3 100644
--- a/glib/gstdio.h
+++ b/glib/gstdio.h
@@ -44,6 +44,10 @@
 
 typedef struct _stat32 GStatBuf;
 
+#elif defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64)
+
+typedef struct _stat64 GStatBuf;
+
 #else
 
 typedef struct stat GStatBuf;