From a1cb68586593282710a3f9f68c2b35af1033a18b Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Sun, 19 Feb 2017 21:58:30 +0000 Subject: [PATCH] ICU-12993 undef __STRICT_ANSI__ on some platforms. X-SVN-Rev: 39692 --- icu4c/source/io/ufile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/icu4c/source/io/ufile.cpp b/icu4c/source/io/ufile.cpp index 756faa5f734..6cbb897555d 100644 --- a/icu4c/source/io/ufile.cpp +++ b/icu4c/source/io/ufile.cpp @@ -20,6 +20,14 @@ ****************************************************************************** */ +#include "unicode/platform.h" +#if defined(__GNUC__) && !defined(__clang__) && defined(__STRICT_ANSI__) +// g++, fileno isn't defined if __STRICT_ANSI__ is defined. +// clang fails to compile the header unless __STRICT_ANSI__ is defined. +// __GNUC__ is set by both gcc and clang. +#undef __STRICT_ANSI__ +#endif + #include "locmap.h" #include "unicode/ustdio.h" -- 2.50.1