mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Include a missing header, and change a mktemp(3), mkdir(2) sequence to
mkdtemp(3). Approved by: murray
This commit is contained in:
parent
563dd74008
commit
1a125da03a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75003
@ -44,6 +44,7 @@ static char rcsid[] = "@(#)$FreeBSD$";
|
||||
#include "token.h"
|
||||
#include "context.h"
|
||||
#include "string.h"
|
||||
#include "mystring.h"
|
||||
|
||||
s_getc()
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user