diff --git a/posix.cc b/posix.cc index 7aca1a86..f41f4341 100644 --- a/posix.cc +++ b/posix.cc @@ -98,7 +98,7 @@ void fmt::BufferedFile::close() { throw SystemError(errno, "cannot close file"); } -int (fmt::BufferedFile::fileno)() const { +int fmt::BufferedFile::fileno() const { int fd = FMT_POSIX_CALL(fileno(file_)); if (fd == -1) throw SystemError(errno, "cannot get file descriptor"); diff --git a/posix.h b/posix.h index 5acf64c6..70a0db1a 100644 --- a/posix.h +++ b/posix.h @@ -46,7 +46,7 @@ #endif #ifndef FMT_POSIX -# ifdef _WIN32 +# if defined(_WIN32) && !defined(__MINGW32__) // Fix warnings about deprecated symbols. # define FMT_POSIX(call) _##call # else