diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 113206b32c45..dd7b2de34ab1 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -33,7 +33,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)commands.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$Id: commands.c,v 1.6 1994/05/08 20:42:26 mycroft Exp $"; +static char *rcsid = "$Id: commands.c,v 1.7 1994/12/24 17:50:00 cgd Exp $"; #endif /* not lint */ #if defined(unix) @@ -2154,7 +2154,7 @@ tn(argc, argv) } else { #endif temp = inet_addr(hostp); - if (temp != (unsigned long) -1) { + if (temp != INADDR_NONE) { sin.sin_addr.s_addr = temp; sin.sin_family = AF_INET; (void) strcpy(_hostname, hostp); @@ -2732,7 +2732,7 @@ sourceroute(arg, cpp, lenp) if (!c) cp2 = 0; - if ((tmp = inet_addr(cp)) != -1) { + if ((tmp = inet_addr(cp)) != INADDR_NONE) { sin_addr.s_addr = tmp; } else if (host = gethostbyname(cp)) { #if defined(h_addr) diff --git a/usr.bin/telnet/externs.h b/usr.bin/telnet/externs.h index fa4122578f98..b6226feca969 100644 --- a/usr.bin/telnet/externs.h +++ b/usr.bin/telnet/externs.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)externs.h 8.1 (Berkeley) 6/6/93 - * $Id: externs.h,v 1.3 1994/02/25 03:00:25 cgd Exp $ + * $Id: externs.h,v 1.4 1994/12/24 17:50:05 cgd Exp $ */ #ifndef BSD @@ -52,6 +52,7 @@ #endif #include +#include #include #if defined(CRAY) && !defined(NO_BSD_SETJMP) #include diff --git a/usr.bin/telnet/ring.c b/usr.bin/telnet/ring.c index e2045c85bc01..1e15f6c088a8 100644 --- a/usr.bin/telnet/ring.c +++ b/usr.bin/telnet/ring.c @@ -33,7 +33,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)ring.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$Id: ring.c,v 1.3 1994/02/25 03:00:34 cgd Exp $"; +static char *rcsid = "$Id: ring.c,v 1.4 1994/12/24 17:50:06 cgd Exp $"; #endif /* not lint */ /* @@ -48,6 +48,10 @@ static char *rcsid = "$Id: ring.c,v 1.3 1994/02/25 03:00:34 cgd Exp $"; */ #include +#ifndef NO_STRING_H +#include +#endif +#include #include #ifdef size_t