summaryrefslogtreecommitdiff
path: root/security/srp_client/patches
diff options
context:
space:
mode:
authormarkd <markd>2004-09-08 14:30:00 +0000
committermarkd <markd>2004-09-08 14:30:00 +0000
commitba03b774180d6c12ec8d2b3e3021d5fba33b0637 (patch)
treedff40ddc29b145d5577ca24d12cc86a7d91f4a14 /security/srp_client/patches
parent6f8b679341d778a33db8f33b7ba83b0610faf68b (diff)
downloadpkgsrc-ba03b774180d6c12ec8d2b3e3021d5fba33b0637.tar.gz
varargs -> stdarg
Don't try and use getutent() on NetBSD's that have utmpx Fixes problems seen in bulkbuild.
Diffstat (limited to 'security/srp_client/patches')
-rw-r--r--security/srp_client/patches/patch-ac51
-rw-r--r--security/srp_client/patches/patch-aj31
2 files changed, 67 insertions, 15 deletions
diff --git a/security/srp_client/patches/patch-ac b/security/srp_client/patches/patch-ac
index aaddb1d61a7..9c5eb021b3c 100644
--- a/security/srp_client/patches/patch-ac
+++ b/security/srp_client/patches/patch-ac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ac,v 1.1.1.1 1999/06/18 19:18:18 jlam Exp $
+$NetBSD: patch-ac,v 1.2 2004/09/08 14:30:00 markd Exp $
Rename setmode (and clearmode for consistency) to avoid clash with unistd.h.
---- telnet/telnet/commands.c.orig Thu Dec 10 17:50:48 1998
-+++ telnet/telnet/commands.c Fri Jun 18 06:59:32 1999
-@@ -64,6 +64,7 @@
+--- telnet/telnet/commands.c.orig 1998-12-11 11:50:48.000000000 +1300
++++ telnet/telnet/commands.c
+@@ -64,11 +64,12 @@ static char sccsid[] = "@(#)commands.c 8
#include <fcntl.h>
#endif /* CRAY */
@@ -12,7 +12,23 @@ Rename setmode (and clearmode for consistency) to avoid clash with unistd.h.
#include <signal.h>
#include <netdb.h>
#include <ctype.h>
-@@ -1156,13 +1157,13 @@
+ #include <pwd.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <errno.h>
+
+ #include <arpa/telnet.h>
+@@ -110,7 +111,8 @@ extern int isprefix();
+ extern char **genget();
+ extern int Ambiguous();
+
+-static call();
++typedef int (*intrtn_t) __P((int, char *[]));
++static call(intrtn_t, ...);
+
+ typedef struct {
+ char *name; /* command name */
+@@ -1156,13 +1158,13 @@ dolmmode(bit, on)
}
int
@@ -28,7 +44,7 @@ Rename setmode (and clearmode for consistency) to avoid clash with unistd.h.
{
return dolmmode(bit, 0);
}
-@@ -1188,18 +1189,18 @@
+@@ -1188,18 +1190,18 @@ static struct modelist ModeList[] = {
#endif
{ "", "", 0 },
{ "", "These require the LINEMODE option to be enabled", 0 },
@@ -59,3 +75,26 @@ Rename setmode (and clearmode for consistency) to avoid clash with unistd.h.
{ "help", 0, modehelp, 0 },
#ifdef KLUDGELINEMODE
{ "kludgeline", 0, dokludgemode, 1 },
+@@ -2607,19 +2609,14 @@ static Command cmdtab2[] = {
+ * Call routine with argc, argv set from args (terminated by 0).
+ */
+
+- /*VARARGS1*/
+- static
+-call(va_alist)
+- va_dcl
++static int
++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) {
+ ;
+ }
diff --git a/security/srp_client/patches/patch-aj b/security/srp_client/patches/patch-aj
index bc0f33174f8..21af451fc9b 100644
--- a/security/srp_client/patches/patch-aj
+++ b/security/srp_client/patches/patch-aj
@@ -1,8 +1,21 @@
-$NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
+$NetBSD: patch-aj,v 1.2 2004/09/08 14:30:00 markd Exp $
---- base/libmisc/utmp.c 2002/08/19 08:56:57 1.1
-+++ base/libmisc/utmp.c 2002/08/19 09:02:40
-@@ -93,6 +93,8 @@
+--- base/libmisc/utmp.c.orig 1998-12-10 14:43:22.000000000 +1300
++++ base/libmisc/utmp.c
+@@ -37,6 +37,12 @@
+ #include <utmpx.h>
+ #endif
+
++#if HAVE_UTMPX_H && defined(__NetBSD__)
++#undef HAVE_SETUTENT
++#undef HAVE_GETUTENT
++#undef HAVE_ENDUTENT
++#endif
++
+ #include <fcntl.h>
+ #include <stdio.h>
+
+@@ -93,6 +99,8 @@ checkutmp (picky)
#endif
#endif
@@ -11,7 +24,7 @@ $NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
#if HAVE_UTMPX_H
setutxent ();
#endif
-@@ -141,17 +143,21 @@
+@@ -141,17 +149,21 @@ checkutmp (picky)
if (utx)
utxent = *utx;
#endif
@@ -33,7 +46,7 @@ $NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
if (!ut) {
puts(NO_UTENT);
-@@ -188,6 +194,7 @@
+@@ -188,6 +200,7 @@ checkutmp (picky)
if (strncmp(line, "/dev/", 5) == 0)
line += 5;
@@ -41,7 +54,7 @@ $NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
strncpy (utent.ut_line, line, sizeof utent.ut_line);
if ((ut = getutline(&utent)))
strncpy(utent.ut_id, ut->ut_id, sizeof ut->ut_id);
-@@ -206,6 +213,7 @@
+@@ -206,6 +219,7 @@ checkutmp (picky)
gettimeofday((struct timeval *) &utxent.ut_tv, NULL);
utent.ut_time = utxent.ut_tv.tv_sec;
#endif
@@ -49,7 +62,7 @@ $NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
}
#else /* !USG */
-@@ -283,6 +291,7 @@
+@@ -283,6 +297,7 @@ setutmp (name, line)
break;
}
}
@@ -57,7 +70,7 @@ $NetBSD: patch-aj,v 1.1 2002/08/19 09:17:16 agc Exp $
while (utmp = getutent ()) {
if (utmp->ut_pid == pid) {
found_utmp = 1;
-@@ -357,6 +366,7 @@
+@@ -357,6 +372,7 @@ setutmp (name, line)
utxent = utxline;
utent = utline;