X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=uip%2Frcvtty.c;h=f92201271b326eb7db043c037c425da0d065b860;hb=7736b0a60c15cc20db0ba8c3e0fe8e11d1c78c20;hp=b847b563972e4f0aab765add41c924fe3e0fc581;hpb=794dab6aa5027ffaf024506140c258f6a0a9322d;p=mmh diff --git a/uip/rcvtty.c b/uip/rcvtty.c index b847b56..f922012 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -191,13 +192,13 @@ message_fd (char **vec) struct stat st; #ifdef HAVE_MKSTEMP - unlink (mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)))); + fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))); #else 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); +#endif if ((child_id = vfork()) == NOTOK) { /* fork error */