Merge pull request #1622 from goshhhy/aix
fix building ninja_test on AIX 6.1
diff --git a/src/test.cc b/src/test.cc
index a9816bc..8ba2297 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -33,6 +33,15 @@
#include "manifest_parser.h"
#include "util.h"
+#ifdef _AIX
+extern "C" {
+ // GCC "helpfully" strips the definition of mkdtemp out on AIX.
+ // The function is still present, so if we define it ourselves
+ // it will work perfectly fine.
+ extern char* mkdtemp(char* name_template);
+}
+#endif
+
namespace {
#ifdef _WIN32