summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2014-12-11 20:56:40 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2014-12-11 20:56:40 +0000
commit2f2daa14367999b0520661eea28e41287a4cbf63 (patch)
treedb9ecdf1db136879a88647de8f07537c47f22f76
parentcddec8a9dd019699d26da3adb0ce22bf7c7b78ba (diff)
Fix platform_support.h's get_temp_file_name() on Newlib under __STRICT_ANSI__
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224057 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/support/platform_support.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/support/platform_support.h b/test/support/platform_support.h
index 09bb29a65..d8b6be623 100644
--- a/test/support/platform_support.h
+++ b/test/support/platform_support.h
@@ -48,6 +48,13 @@
#include <unistd.h> // 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()