Workaround a bug in the definition of fstat on some versions of MinGW

This commit is contained in:
vitaut 2015-05-11 08:44:40 -07:00
parent 15de5f68b4
commit 8035c3eb30

View File

@ -87,7 +87,7 @@ typedef off_t FileSize;
static FileSize max_file_size() { return std::numeric_limits<FileSize>::max(); }
int test::fstat(int fd, struct stat *buf) {
int (test::fstat)(int fd, struct stat *buf) {
int result = ::fstat(fd, buf);
if (fstat_sim == MAX_SIZE)
buf->st_size = max_file_size();