closures: Check for mkostemp(3)
This commit is contained in:
@@ -64,7 +64,7 @@ EOF
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
AC_CHECK_FUNCS(mmap)
|
||||
AC_CHECK_FUNCS([mmap mkostemp])
|
||||
AC_FUNC_MMAP_BLACKLIST
|
||||
|
||||
dnl The -no-testsuite modules omit the test subdir.
|
||||
|
||||
@@ -267,7 +267,13 @@ static size_t execsize = 0;
|
||||
static int
|
||||
open_temp_exec_file_name (char *name, int flags)
|
||||
{
|
||||
int fd = mkostemp (name, flags);
|
||||
int fd;
|
||||
|
||||
#ifdef HAVE_MKOSTEMP
|
||||
fd = mkostemp (name, flags);
|
||||
#else
|
||||
fd = mkstemp (name);
|
||||
#endif
|
||||
|
||||
if (fd != -1)
|
||||
unlink (name);
|
||||
|
||||
Reference in New Issue
Block a user