summaryrefslogtreecommitdiff
path: root/net/socks4/patches/patch-ag
blob: 431befab4f902e2d6eed561268ecf421e38d4479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$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 <netdb.h>
 #include <ctype.h>
 #include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <errno.h>
 #if defined(ISC)
 #include <net/errno.h>
@@ -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) {
 	;
     }