Include a missing header, and change a mktemp(3), mkdir(2) sequence to

mkdtemp(3).

Approved by:	murray
This commit is contained in:
eric 2001-03-29 20:33:57 +00:00
parent cac498f4bb
commit afed3dc4e9
2 changed files with 2 additions and 2 deletions

View File

@ -44,6 +44,7 @@ static char rcsid[] = "@(#)$FreeBSD$";
#include "token.h"
#include "context.h"
#include "string.h"
#include "mystring.h"
s_getc()
{

View File

@ -64,8 +64,7 @@ wwterminfoinit()
/* make the directory */
(void) sprintf(wwterminfopath, "%swwinXXXXXX", _PATH_TMP);
mktemp(wwterminfopath);
if (mkdir(wwterminfopath, 0755) < 0 ||
if (mkdtemp(wwterminfopath) < 0 ||
chmod(wwterminfopath, 00755) < 0) {
wwerrno = WWE_SYS;
return -1;