mirror of
https://github.com/git/git.git
synced 2026-03-14 02:43:25 +01:00
implement mkstemp()
This commit is contained in:
committed by
Johannes Sixt
parent
b4792a360e
commit
27317da439
@@ -77,7 +77,15 @@ const char *inet_ntop(int af, const void *src,
|
||||
}
|
||||
int mkstemp (char *__template)
|
||||
{
|
||||
return -1;
|
||||
char *temp = xstrdup(__template);
|
||||
char *filename = mktemp(__template);
|
||||
int fd;
|
||||
|
||||
if (filename == NULL)
|
||||
return -1;
|
||||
fd = open(filename, O_RDWR | O_CREAT);
|
||||
free(filename);
|
||||
return fd;
|
||||
}
|
||||
int gettimeofday(struct timeval *tv, void *tz)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user