summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorky0ko <ky0ko@disroot.org>2019-08-05 14:55:23 -0700
committerky0ko <ky0ko@disroot.org>2019-08-05 14:55:23 -0700
commit5521085b2daf1f55d4256153166d790978b6bb34 (patch)
tree6bdf9fa23a04a366b89ae6062fb3156a70f93b9b
parent70c8d75055b4fcb0ee6d9a41b908c554534725f6 (diff)
downloadninja-5521085b2daf1f55d4256153166d790978b6bb34.tar.gz
fix building ninja_test on AIX 6.1
-rw-r--r--src/test.cc9
1 files changed, 9 insertions, 0 deletions
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