diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c index 27f94ad047..d12f5bd999 100644 --- a/deps/libeio/eio.c +++ b/deps/libeio/eio.c @@ -885,6 +885,14 @@ static int eio__futimes (int fd, const struct timeval tv[2]) # define fdatasync(fd) fsync (fd) #endif +// Use unicode and big file aware stat on windows +#ifdef _WIN32 +# undef stat +# undef fstat +# define stat _stati64 +# define fstat _fstati64 +#endif + /* sync_file_range always needs emulation */ int eio__sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags) diff --git a/deps/libeio/eio.h b/deps/libeio/eio.h index 5e2bdfe63d..785e5b0561 100644 --- a/deps/libeio/eio.h +++ b/deps/libeio/eio.h @@ -66,7 +66,11 @@ typedef int (*eio_cb)(eio_req *req); #endif #ifndef EIO_STRUCT_STAT -# define EIO_STRUCT_STAT struct stat +# ifdef _WIN32 +# define EIO_STRUCT_STAT struct _stati64 +# else +# define EIO_STRUCT_STAT struct stat +# endif #endif #ifndef EIO_STRUCT_STATVFS