Skip to content
Snippets Groups Projects
Commit d829c02f authored by Howard Chu's avatar Howard Chu
Browse files

Add checks for mkstemp and mktemp. Tweak utils.c:mkstemp to honor the

HAVE_MKTEMP macro in addition to HAVE_MKSTEMP
parent 3bdbaf54
No related branches found
No related tags found
No related merge requests found
......@@ -2337,6 +2337,8 @@ AC_CHECK_FUNCS( \
lockf \
memcpy \
memmove \
mkstemp \
mktemp \
pipe \
read \
recv \
......
......@@ -8,6 +8,7 @@
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/unistd.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
......@@ -33,6 +34,10 @@ char* lutil_progname( const char* name, int argc, char *argv[] )
#ifndef HAVE_MKSTEMP
int mkstemp( char * template )
{
#ifdef HAVE_MKTEMP
return open ( mktemp ( template ), O_RDWR|O_CREAT|O_EXCL, 0600 );
#else
return -1
#endif
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment