aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Hunter <evan@ozhiker.com>2016-03-01 09:18:05 +0000
committerSteve Bennett <steveb@workware.net.au>2016-03-27 11:01:48 +1000
commit4a687b39b373720201176f21c08c0f29712cbf32 (patch)
tree93f1f6848f44bbd05f14e8166e855a5a6125f355
parent73380285fac00fe416140e199794db8e074694ff (diff)
downloadjimtcl-4a687b39b373720201176f21c08c0f29712cbf32.zip
jimtcl-4a687b39b373720201176f21c08c0f29712cbf32.tar.gz
jimtcl-4a687b39b373720201176f21c08c0f29712cbf32.tar.bz2
aio: MinGW - Fix compilation error
Due to not having support for group or owner permission flags.
-rw-r--r--jim-aio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/jim-aio.c b/jim-aio.c
index 1ac3b56..0d11648 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -1800,7 +1800,12 @@ int Jim_MakeTempFile(Jim_Interp *interp, const char *template)
filenameObj = Jim_NewStringObj(interp, template, -1);
}
+#if defined(S_IRWXG) && defined(S_IRWXO)
mask = umask(S_IXUSR | S_IRWXG | S_IRWXO);
+#else
+ /* MinGW does not have group/owner permissions */
+ mask = umask(S_IXUSR);
+#endif
/* Update the template name directly with the filename */
fd = mkstemp(filenameObj->bytes);