From 963bdd7c0a2d891fbeae22d9e7de47f8a027406e Mon Sep 17 00:00:00 2001 From: Jonathan Roelofs Date: Thu, 11 Dec 2014 20:56:40 +0000 Subject: [PATCH] Fix platform_support.h's get_temp_file_name() on Newlib under __STRICT_ANSI__ llvm-svn: 224057 --- libcxx/test/support/platform_support.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libcxx/test/support/platform_support.h b/libcxx/test/support/platform_support.h index 09bb29a65e4e..d8b6be623765 100644 --- a/libcxx/test/support/platform_support.h +++ b/libcxx/test/support/platform_support.h @@ -48,6 +48,13 @@ #include // close #endif +#if defined(_NEWLIB_VERSION) && defined(__STRICT_ANSI__) +// Newlib provies this, but in the header it's under __STRICT_ANSI__ +extern "C" { + int mkstemp(char*); +} +#endif + inline std::string get_temp_file_name()