$OpenBSD: patch-clients_telnet_commands_c,v 1.1 2004/01/05 03:32:11 espie Exp $
--- clients/telnet/commands.c.orig	2000-08-16 17:38:46.000000000 +0200
+++ clients/telnet/commands.c	2004-01-05 04:28:51.000000000 +0100
@@ -83,7 +83,7 @@ static char sccsid[] = "@(#)commands.c	8
 #include <signal.h>
 #include <ctype.h>
 #include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <errno.h>
 
 #include <arpa/telnet.h>
@@ -122,7 +122,8 @@ extern char **genget();
 extern int Ambiguous();
 extern void herror();
 
-static int call();
+typedef int (*intrtn_t)();
+static int call(intrtn_t, ...);
 
 typedef struct {
     char *name;		/* command name */
@@ -2092,17 +2093,13 @@ static Command cmdtab2[] = {
 
     /*VARARGS1*/
     static int
-call(va_alist)
-    va_dcl
+call(intrtn_t routine, ...)
 {
     va_list ap;
-    typedef int (*intrtn_t)();
-    intrtn_t routine;
     char *args[100];
     int argno = 0;
 
-    va_start(ap);
-    routine = (va_arg(ap, intrtn_t));
+    va_start(ap, routine);
     while ((args[argno++] = va_arg(ap, char *)) != 0) {
 	;
     }
