summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2021-08-28 15:41:42 +0700
committerPierre Joye <pierre.php@gmail.com>2021-08-28 15:41:42 +0700
commit87ac6fdd02d0c0af33e452c5819b395bbece160d (patch)
treeb6466c4ce0c26ed4b9d118f9d0bad9236dc30024 /tests
parenta35bed9ac5e9f7837db63ff2a0650c4c3a89701a (diff)
downloadlibgd-87ac6fdd02d0c0af33e452c5819b395bbece160d.tar.gz
fix linux/macos build
Diffstat (limited to 'tests')
-rw-r--r--tests/gdtest/gdtest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c
index 66a4d2f..0548690 100644
--- a/tests/gdtest/gdtest.c
+++ b/tests/gdtest/gdtest.c
@@ -304,7 +304,11 @@ const char *gdTestTempDir(void)
if (tmpdir_root == NULL) {
// On MingW it seems we fail too often. Let default to this and create it ourselves
tmpdir_root = "./tmp";
+#if defined(__MINGW32__) || defined(__MINGW64__)
if (mkdir(tmpdir_root) == 0) {
+#else
+ if (mkdir(tmpdir_root, 0700) == 0) {
+#endif
printf("tmpdir failed to be used or initialized (%s).", tmpdir_root);
exit(2);
}