From b2207f9d05d49b3c43a939d54edf4695a85f4932 Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 12 Mar 2015 07:24:15 -0700 Subject: [PATCH] Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/ --- posix.cc | 1 + posix.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/posix.cc b/posix.cc index 368bf94f..4c086af6 100644 --- a/posix.cc +++ b/posix.cc @@ -33,6 +33,7 @@ #include "posix.h" #include +#include #include #ifndef _WIN32 diff --git a/posix.h b/posix.h index 24100d9b..5acf64c6 100644 --- a/posix.h +++ b/posix.h @@ -28,8 +28,12 @@ #ifndef FMT_POSIX_H_ #define FMT_POSIX_H_ +#ifdef __MINGW32__ +// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. +# undef __STRICT_ANSI__ +#endif + #include -#include // required for fcntl.h on MinGW #include // for O_RDONLY #include