I had to add #include <windows.h> to get ioctl.c to compile for mingw. Without it the HANDLE type was not defined.
The gnulib fstat doc says: "On platforms where off_t is a 32-bit type, stat may not correctly report the size of files or block devices larger than 2 GB. The fix is to use the AC_SYS_LARGEFILE macro. " Recently it was discovered that the latest versions of wget mingw were not handling large files properly. I'm overriding the gnulib fstat in my own builds by doing redefines like this for the stat functions and structs #if defined fstat #undef fstat #endif #define fstat _fstati64 There's no _FILE_OFFSET_BITS stuff in my mingw headers. Do you have any advice for this situation? I'm not subscribed to the list so please cc me. Thanks