diff options
-rw-r--r-- | Src/utils.c | 5 | ||||
-rw-r--r-- | configure.in | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c index db404ec26..75108765b 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1091,7 +1091,12 @@ gettempname(void) if (!(s = getsparam("TMPPREFIX"))) s = DEFAULT_TMPPREFIX; +#ifdef HAVE__MKTEMP + /* Zsh uses mktemp() safely, so silence the warnings */ + return ((char *) _mktemp(dyncat(unmeta(s), "XXXXXX"))); +#else return ((char *) mktemp(dyncat(unmeta(s), "XXXXXX"))); +#endif } /* Check if a string contains a token */ diff --git a/configure.in b/configure.in index 502acffc5..973b0fd1f 100644 --- a/configure.in +++ b/configure.in @@ -813,7 +813,7 @@ AC_CHECK_FUNCS(lchown memcpy memmove \ nis_list initgroups fchdir cap_get_proc readlink nice \ getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \ inet_aton inet_pton inet_ntop getipnodebyname gethostbyname2 \ - fseeko ftello mmap munmap msync ftruncate setlocale) + fseeko ftello mmap munmap msync ftruncate setlocale _mktemp) dnl --------------- dnl CHECK FUNCTIONS |