$NetBSD: patch-ag,v 1.1 2004/09/08 15:03:15 sketch Exp $ --- rtelnet/telnet/commands.c.orig 1995-02-25 00:36:16.000000000 +0000 +++ rtelnet/telnet/commands.c 2004-09-08 15:57:55.000000000 +0100 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #if defined(ISC) #include @@ -112,7 +112,7 @@ extern char **genget(); extern int Ambiguous(); -static call(); +static int call(void *, ...); typedef struct { char *name; /* command name */ @@ -2345,17 +2345,15 @@ /*VARARGS1*/ static -call(va_alist) - va_dcl +call(void *func, ...) { va_list ap; typedef int (*intrtn_t)(); - intrtn_t routine; + intrtn_t routine = (intrtn_t) func; char *args[100]; int argno = 0; - va_start(ap); - routine = (va_arg(ap, intrtn_t)); + va_start(ap, func); while ((args[argno++] = va_arg(ap, char *)) != 0) { ; }