Woraround a bug in MinGW

This commit is contained in:
vitaut 2015-03-12 07:49:01 -07:00
parent b2207f9d05
commit 6bca5ca109
2 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,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");

View File

@ -36,6 +36,10 @@
# include <crtdbg.h> // for _CrtSetReportMode
#endif // _WIN32
#ifdef __MINGW32__
# undef fileno
#endif
namespace {
#if defined(_WIN32) && !defined(__MINGW32__)