From 5b9b485f57e8826c499d9fce47d700b9bfe1aa1e Mon Sep 17 00:00:00 2001 From: vitaut Date: Wed, 24 Jun 2015 11:36:28 -0700 Subject: [PATCH] Workaround a bug in MinGW --- test/gtest-extra-test.cc | 6 +----- test/posix-test.cc | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/gtest-extra-test.cc b/test/gtest-extra-test.cc index 622dcdcb..12c893c8 100644 --- a/test/gtest-extra-test.cc +++ b/test/gtest-extra-test.cc @@ -38,10 +38,6 @@ #include "util.h" -#ifdef __MINGW32__ -# undef fileno -#endif - namespace { #ifdef _MSC_VER @@ -376,7 +372,7 @@ TEST(OutputRedirectTest, FlushErrorInCtor) { TEST(OutputRedirectTest, DupErrorInCtor) { BufferedFile f = open_buffered_file(); - int fd = f.fileno(); + int fd = (f.fileno)(); File copy = File::dup(fd); FMT_POSIX(close(fd)); OutputRedirect *redir = 0; diff --git a/test/posix-test.cc b/test/posix-test.cc index 3f897741..701fc427 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -31,6 +31,10 @@ #include "posix.h" #include "util.h" +#ifdef __MINGW32__ +# undef fileno +#endif + using fmt::BufferedFile; using fmt::ErrorCode; using fmt::File;