2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Use mkdtempat_np() and mkostempsat_np() on macOS

This commit is contained in:
Todd C. Miller
2022-09-22 11:34:00 -06:00
parent 9d654482b2
commit d37710b0f6
5 changed files with 60 additions and 21 deletions

View File

@@ -24,7 +24,8 @@
#include <config.h>
#if !defined(HAVE_MKDTEMP) || !defined(HAVE_MKDTEMPAT) || !defined(HAVE_MKOSTEMPSAT) || !defined(HAVE_MKSTEMPS)
#if (!defined(HAVE_MKDTEMPAT) && !defined(HAVE_MKDTEMPAT_NP)) || \
(!defined(HAVE_MKOSTEMPSAT) && !defined(HAVE_MKOSTEMPSAT_NP))
#include <sys/stat.h>
@@ -168,4 +169,4 @@ sudo_mkstemps(char *path, int slen)
{
return mktemp_internal(AT_FDCWD, path, slen, MKTEMP_FILE, 0);
}
#endif /* !HAVE_MKDTEMP || !HAVE_MKDTEMPAT || !HAVE_MKOSTEMPSAT || !HAVE_MKSTEMPS */
#endif /* !HAVE_MKDTEMPAT || !HAVE_MKOSTEMPSAT */