Skip to content

gtk/gtkiconcache.c: Fix running on GLib-2.57.3 or later on Windows

Chun-wei Fan requested to merge gtk-2-24.win.fixes into gtk-2-24

Hi,

In GLib-2.57.3, gstdio.h was updated to typedef GStatBuf to different struct stat types on Windows, depending on the architecture and the compiler used. This means that we can't just call fstat() on the GStatBuf that we are using, but instead we need to call the corresponding CRT function according to what GStatBuf is typedef'ed to.

This will avoid stack corruption crashes/CRT aborts on 32-bit Visual Studio builds, and should fix running GTK+-2.x programs that were built with mingw-w64.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports