diff -Nru x25_utils-2.3.93.orig/libtelnet/misc.c x25_utils-2.3.93/libtelnet/misc.c --- x25_utils-2.3.93.orig/libtelnet/misc.c 1993-12-17 07:32:43.000000000 +0100 +++ x25_utils-2.3.93/libtelnet/misc.c 2009-07-12 14:26:35.000000000 +0200 @@ -55,6 +55,8 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#include +#include #include "misc.h" char *RemoteHostName; diff -Nru x25_utils-2.3.93.orig/Makefile x25_utils-2.3.93/Makefile --- x25_utils-2.3.93.orig/Makefile 2000-10-20 16:14:28.000000000 +0200 +++ x25_utils-2.3.93/Makefile 2009-07-12 14:26:35.000000000 +0200 @@ -43,7 +43,7 @@ SUB = libtelnet telnet telnetd trace route all: - for i in $(SUB); do make -C $$i; done + for i in $(SUB); do make -C $$i || exit 1; done install: for i in $(SUB); do make -C $$i install; done diff -Nru x25_utils-2.3.93.orig/telnet/commands.c x25_utils-2.3.93/telnet/commands.c --- x25_utils-2.3.93.orig/telnet/commands.c 1996-12-15 23:00:16.000000000 +0100 +++ x25_utils-2.3.93/telnet/commands.c 2009-07-12 14:26:35.000000000 +0200 @@ -55,7 +55,6 @@ #include #include #include -#include #include #include @@ -80,7 +79,7 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 -#endif MAXHOSTNAMELEN +#endif /* MAXHOSTNAMELEN */ char *hostname; static char _hostname[MAXHOSTNAMELEN]; @@ -91,7 +90,7 @@ extern char **genget(); extern int Ambiguous(); -static call(); +static call(void *fmt, ...); typedef struct { char *name; /* command name */ @@ -2330,8 +2329,7 @@ /*VARARGS1*/ static -call(va_alist) - va_dcl +call(void *fmt, ...) { va_list ap; typedef int (*intrtn_t)(); @@ -2339,7 +2337,7 @@ char *args[100]; int argno = 0; - va_start(ap); + va_start(ap, fmt); routine = (va_arg(ap, intrtn_t)); while ((args[argno++] = va_arg(ap, char *)) != 0) { ; diff -Nru x25_utils-2.3.93.orig/telnet/externs.h x25_utils-2.3.93/telnet/externs.h --- x25_utils-2.3.93.orig/telnet/externs.h 1994-07-26 12:53:03.000000000 +0200 +++ x25_utils-2.3.93/telnet/externs.h 2009-07-12 14:26:35.000000000 +0200 @@ -43,6 +43,9 @@ #endif #include +#include +#include +#include #include #include #include diff -Nru x25_utils-2.3.93.orig/telnet/ring.c x25_utils-2.3.93/telnet/ring.c --- x25_utils-2.3.93.orig/telnet/ring.c 1993-12-17 08:18:19.000000000 +0100 +++ x25_utils-2.3.93/telnet/ring.c 2009-07-12 14:26:35.000000000 +0200 @@ -62,6 +62,7 @@ #include "ring.h" #include "general.h" +#include "externs.h" /* Internal macros */ diff -Nru x25_utils-2.3.93.orig/telnet/sys_bsd.c x25_utils-2.3.93/telnet/sys_bsd.c --- x25_utils-2.3.93.orig/telnet/sys_bsd.c 2000-10-20 17:07:34.000000000 +0200 +++ x25_utils-2.3.93/telnet/sys_bsd.c 2009-07-12 14:26:35.000000000 +0200 @@ -111,6 +111,12 @@ static fd_set ibits, obits, xbits; +#ifdef SIGTSTP +static SIG_FUNC_RET susp(); +#endif /* SIGTSTP */ +#ifdef SIGINFO +static SIG_FUNC_RET ayt(); +#endif /* SIGINFO */ void init_sys() @@ -600,18 +606,11 @@ if (f != -1) { #ifdef SIGTSTP - static SIG_FUNC_RET susp(); -#endif /* SIGTSTP */ -#ifdef SIGINFO - static SIG_FUNC_RET ayt(); -#endif SIGINFO - -#ifdef SIGTSTP (void) signal(SIGTSTP, susp); #endif /* SIGTSTP */ #ifdef SIGINFO (void) signal(SIGINFO, ayt); -#endif SIGINFO +#endif /* SIGINFO */ #if defined(USE_TERMIO) && defined(NOKERNINFO) tmp_tc.c_lflag |= NOKERNINFO; #endif @@ -653,7 +652,7 @@ } else { #ifdef SIGINFO (void) signal(SIGINFO, ayt_status); -#endif SIGINFO +#endif /* SIGINFO */ #ifdef SIGTSTP (void) signal(SIGTSTP, SIG_DFL); /* (void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1))); */ diff -Nru x25_utils-2.3.93.orig/telnet/telnet.c x25_utils-2.3.93/telnet/telnet.c --- x25_utils-2.3.93.orig/telnet/telnet.c 1996-12-15 22:38:11.000000000 +0100 +++ x25_utils-2.3.93/telnet/telnet.c 2009-07-12 14:28:11.000000000 +0200 @@ -193,7 +193,6 @@ #ifdef notdef -#include /*VARARGS*/ static void @@ -825,7 +824,7 @@ TerminalSpeeds(&ispeed, &ospeed); - sprintf((char *)temp, "%c%c%c%c%d,%d%c%c", IAC, SB, TELOPT_TSPEED, + sprintf((char *)temp, "%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, TELQUAL_IS, ospeed, ispeed, IAC, SE); len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ diff -Nru x25_utils-2.3.93.orig/telnetd/sys_term.c x25_utils-2.3.93/telnetd/sys_term.c --- x25_utils-2.3.93.orig/telnetd/sys_term.c 2000-12-01 00:22:49.000000000 +0100 +++ x25_utils-2.3.93/telnetd/sys_term.c 2009-07-12 14:26:35.000000000 +0200 @@ -39,6 +39,8 @@ static char rcsid[] = "$Id: x25_utils-2.3.93-gentoo.patch,v 1.1 2009/07/12 12:41:35 mrness Exp $"; #endif /* not lint */ +#include +#include #include "telnetd.h" #include "pathnames.h" @@ -1380,14 +1382,14 @@ } for (cpp = argv; *cpp; cpp++) ; - if (cpp == &argv[(int)argv[-1]]) { + if (cpp == &argv[(intptr_t)argv[-1]]) { --argv; - *argv = (char *)((int)(*argv) + 10); - argv = (char **)realloc(argv, (int)(*argv) + 2); + *argv = (char *)((intptr_t)(*argv) + 10); + argv = (char **)realloc(argv, (intptr_t)(*argv) + 2); if (argv == NULL) return(NULL); argv++; - cpp = &argv[(int)argv[-1] - 10]; + cpp = &argv[(intptr_t)argv[-1] - 10]; } *cpp++ = val; *cpp = 0; diff -Nru x25_utils-2.3.93.orig/telnetd/telnetd.c x25_utils-2.3.93/telnetd/telnetd.c --- x25_utils-2.3.93.orig/telnetd/telnetd.c 2000-11-27 22:43:43.000000000 +0100 +++ x25_utils-2.3.93/telnetd/telnetd.c 2009-07-12 14:32:26.000000000 +0200 @@ -249,7 +249,7 @@ #endif /* AUTHENTICATE */ default: - fprintf(stderr, "telnetd: %s: unknown option\n", ch); + fprintf(stderr, "telnetd: %c: unknown option\n", ch); /* FALLTHROUGH */ case '?': usage(); diff -Nru x25_utils-2.3.93.orig/telnetd/utility.c x25_utils-2.3.93/telnetd/utility.c --- x25_utils-2.3.93.orig/telnetd/utility.c 2000-12-07 19:50:37.000000000 +0100 +++ x25_utils-2.3.93/telnetd/utility.c 2009-07-12 14:26:35.000000000 +0200 @@ -40,6 +40,7 @@ #include #include "telnetd.h" #include +#include /* * utility functions performing io related tasks