From 3913f29ad7cb429c7c94bd3a75cb3e920aa0bdaf Mon Sep 17 00:00:00 2001 From: vitaut Date: Mon, 11 May 2015 07:57:08 -0700 Subject: [PATCH] Fix posix-test on MinGW --- test/posix-test.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/posix-test.cc b/test/posix-test.cc index 742a3b1f..358ed84a 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -79,7 +79,13 @@ int test::open(const char *path, int oflag, int mode) { return ::open(path, oflag, mode); } -static off_t max_file_size() { return std::numeric_limits::max(); } +#ifdef _WIN32 +typedef fmt::LongLong FileSize; +#else +typedef off_t FileSize; +#endif + +static FileSize max_file_size() { return std::numeric_limits::max(); } int test::fstat(int fd, struct stat *buf) { int result = ::fstat(fd, buf);