projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use mkstemp on systems that have it
[mmh]
/
uip
/
rcvtty.c
diff --git
a/uip/rcvtty.c
b/uip/rcvtty.c
index
9eb365f
..
cb194dd
100644
(file)
--- a/
uip/rcvtty.c
+++ b/
uip/rcvtty.c
@@
-189,7
+189,11
@@
message_fd (char **vec)
char tmpfil[BUFSIZ];
struct stat st;
char tmpfil[BUFSIZ];
struct stat st;
+#ifdef HAVE_MKSTEMP
+ unlink (mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))));
+#else
unlink (mktemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))));
unlink (mktemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))));
+#endif
if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK)
return header_fd ();
unlink (tmpfil);
if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK)
return header_fd ();
unlink (tmpfil);