openbsd-ports/mail/nmh/patches/patch-ae
1998-05-28 21:53:50 +00:00

15 lines
431 B
Plaintext

--- uip/rcvtty.c.orig Sat May 16 14:32:08 1998
+++ uip/rcvtty.c Thu May 28 11:31:44 1998
@@ -192,8 +192,9 @@
char tmpfil[BUFSIZ];
struct stat st;
- unlink (mktemp (strcpy (tmpfil, "/tmp/rcvttyXXXXX")));
- if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK)
+ strcpy (tmpfil, "/tmp/rcvttyXXXXX");
+ fd = mkstemp( tmpfil );
+ if ( fd == -1 )
return header_fd ();
unlink (tmpfil);