From 93cfe9951b9732b4fdec9cfaae1f6c83740f1e83 Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 12 Mar 2015 06:48:14 -0700 Subject: [PATCH] Woraround for braindamaged versions of MinGW --- posix.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/posix.h b/posix.h index e16ac521..cb0390bd 100644 --- a/posix.h +++ b/posix.h @@ -188,7 +188,9 @@ public: // Returns the pointer to a FILE object representing this file. FILE *get() const FMT_NOEXCEPT { return file_; } - int fileno() const; + // We place parentheses around fileno to workaround a bug in some versions + // of MinGW that define fileno as a macro. + int (fileno)() const; void print(fmt::StringRef format_str, const ArgList &args) { fmt::print(file_, format_str, args);