fix linux/macos build

master
Pierre Joye 2021-08-28 15:41:42 +07:00
parent a35bed9ac5
commit 87ac6fdd02
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}