diff options
author | Bert Belder <bertbelder@gmail.com> | 2010-11-26 03:24:04 +0300 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2010-12-21 01:51:15 +0300 |
commit | 967b7b0d8cd48a6ec87ff9512987f845a5b4ed52 (patch) | |
tree | a18e6bf0329b52c9f2ab3ddad571ff42a8de04fe /deps | |
parent | f48c36f74f98c606d2770259a4c950f8f9fd3329 (diff) |
Libeio should use correct stat/fstat as well
Diffstat (limited to 'deps')
-rw-r--r-- | deps/libeio/eio.c | 8 | ||||
-rw-r--r-- | deps/libeio/eio.h | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c index 27f94ad047f..d12f5bd999c 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 5e2bdfe63d6..785e5b0561e 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 |