The odd thing is this is behind #ifdef HAVE_WORKING_STAT # define FIND_FILE0_DECL struct stat *st # define FIND_FILE0_ARGS st #else # define FIND_FILE0_DECL uint64_t id, const char *path # define FIND_FILE0_ARGS id, path but yes, if !HAVE_WORKING_STAT the code is broken. So the question would be why !HAVE_WORKING_STAT - we're expecting this only for __MINGW32__.