$NetBSD: patch-ae,v 1.1 2003/12/19 12:24:25 agc Exp $

--- clients/telnet/commands.c	2003/12/19 12:14:28	1.1
+++ clients/telnet/commands.c	2003/12/19 12:16:29
@@ -83,7 +83,7 @@
 #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,7 @@
 extern int Ambiguous();
 extern void herror();
 
-static call();
+static int call(void *, ...);
 
 typedef struct {
     char *name;		/* command name */
@@ -2092,17 +2092,15 @@
 
     /*VARARGS1*/
     static int
-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) {
 	;
     }
