about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 6bede2e43..1bd4afeca 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1101,12 +1101,15 @@ gettempname(void)
     if (!(s = getsparam("TMPPREFIX")))
 	s = DEFAULT_TMPPREFIX;
  
+#ifdef HAVE_MKSTEMP
+    ret = ((char *) mkstemp(dyncat(unmeta(s), "XXXXXX")));
 #ifdef HAVE__MKTEMP
     /* Zsh uses mktemp() safely, so silence the warnings */
     ret = ((char *) _mktemp(dyncat(unmeta(s), "XXXXXX")));
 #else
     ret = ((char *) mktemp(dyncat(unmeta(s), "XXXXXX")));
 #endif
+#endif
     unqueue_signals();
 
     return ret;