Looks like some versions of mingw don't have errno_t. Use int.