-D_FILE_OFFSET_BITS=64
also changes the size of time_t to 64 bits (see #3494). This is a bug in mingw: http://sourceforge.net/p/mingw-w64/bugs/279/
Override this by adding -D_USE_32BIT_TIME_T
.
According to @theuni: ‘sizeof(time_t) should be 4 for win32. If it’s 8, the headers are buggy and runtime will be unpredictable. At runtime, a 4byte value is stored in an 8byte var, leaving half uninit’d. Using a recent mingw it’s 4 as expected. I’m assuming gitian’s version still has this bug.’