mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Woraround a bug in MinGW
This commit is contained in:
parent
b2207f9d05
commit
6bca5ca109
2
posix.cc
2
posix.cc
@ -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");
|
||||
|
@ -36,6 +36,10 @@
|
||||
# include <crtdbg.h> // for _CrtSetReportMode
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# undef fileno
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
|
Loading…
Reference in New Issue
Block a user