After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760615 - GTK FTBFS with MinGW-w64
GTK FTBFS with MinGW-w64
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-01-14 09:45 UTC by LRN
Modified: 2016-01-14 09:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
W32: Ensure that correct statting function is used by iconcache (1.51 KB, patch)
2016-01-14 09:45 UTC, LRN
committed Details | Review

Description LRN 2016-01-14 09:45:32 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.
Comment 1 LRN 2016-01-14 09:45:38 UTC
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.
Comment 2 LRN 2016-01-14 09:47:20 UTC
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.
Comment 3 Ignacio Casal Quinteiro (nacho) 2016-01-14 09:48:44 UTC
Review of attachment 319003 [details] [review]:

Looks good.
Comment 4 LRN 2016-01-14 09:51:05 UTC
Attachment 319003 [details] pushed as 59f1b87 - W32: Ensure that correct statting function is used by iconcache