GNOME Bugzilla – Bug 760615
GTK FTBFS with MinGW-w64
Last modified: 2016-01-14 09:51:09 UTC
This is due to MinGW-w64 doing crazy things with stat and related functions. Luckily, there's a workaround for that already in place, for MSVC, and it works for MinGW-w64 as well.
Created attachment 319003 [details] [review] W32: Ensure that correct statting function is used by iconcache With Mingw-w64 fstat() can be an inline function that calls _fstat32() or _fstat64(), depending on some macros. And if LFS is enabled, fstat() is defined to turn into _fstat32i64() or _fstat64(). And some/all of the above might also be macros as well. Side-step all that mess and excplicitly re-define fstat as _fstat32, which is guaranteed to use a version of "stat" struct that has 32-bit size and time fields, which is what we want.
Okay, now some notes: 1) It says "FTBFS", but i don't actually remember what the symptoms were. Since it's a stat mismatch, most likely it results in runtime crashes in iconcache (nasty!), unless fixed. 2) This patch (or some variation of it) has been in use for a long time (more than a year, i'd wager), which means it's well-tested.
Review of attachment 319003 [details] [review]: Looks good.
Attachment 319003 [details] pushed as 59f1b87 - W32: Ensure that correct statting function is used by iconcache