X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frcvtty.c;h=5bdddb233dd61b66ba9aa34ed4bf124ba7328deb;hp=b847b563972e4f0aab765add41c924fe3e0fc581;hb=aae44c933a5b035e0b23abf4dd4247cd37e4d041;hpb=794dab6aa5027ffaf024506140c258f6a0a9322d diff --git a/uip/rcvtty.c b/uip/rcvtty.c index b847b56..5bdddb2 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ static struct swit switches[] = { #define VERSIONSW 8 { "version", 0 }, #define HELPSW 9 - { "help", 4 }, + { "help", 0 }, { NULL, 0 } }; @@ -191,12 +192,12 @@ 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 (); +#endif unlink (tmpfil); if ((child_id = vfork()) == NOTOK) {