projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make daemon try the operations that might fail before fork rather than after
[musl]
/
src
/
temp
/
mkstemp.c
diff --git
a/src/temp/mkstemp.c
b/src/temp/mkstemp.c
index
b156719
..
5e8bb93
100644
(file)
--- a/
src/temp/mkstemp.c
+++ b/
src/temp/mkstemp.c
@@
-7,11
+7,13
@@
#include <errno.h>
#include "libc.h"
#include <errno.h>
#include "libc.h"
+char *__mktemp(char *);
+
int mkstemp(char *template)
{
int fd;
retry:
int mkstemp(char *template)
{
int fd;
retry:
- if (!mktemp(template)) return -1;
+ if (!
__
mktemp(template)) return -1;
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
if (fd >= 0) return fd;
if (errno == EEXIST) {
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
if (fd >= 0) return fd;
if (errno == EEXIST) {