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;