summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authordanw <danw@pkgsrc.org>2004-04-14 21:48:49 +0000
committerdanw <danw@pkgsrc.org>2004-04-14 21:48:49 +0000
commitc074d6d70a5bce57e95ab49ceffa81576b6f9e69 (patch)
treebc70278ba173302acab55534f3a7ef8457bbfd75 /net
parent33bf7c0e8229df7614a480fbf754758d2ce5cdc7 (diff)
downloadpkgsrc-c074d6d70a5bce57e95ab49ceffa81576b6f9e69.tar.gz
Make this build on Darwin. pkg/23325
Diffstat (limited to 'net')
-rw-r--r--net/net-snmp/distinfo5
-rw-r--r--net/net-snmp/patches/patch-ab145
-rw-r--r--net/net-snmp/patches/patch-ae15
3 files changed, 132 insertions, 33 deletions
diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo
index fd1bfd6d326..6d0b5c201c3 100644
--- a/net/net-snmp/distinfo
+++ b/net/net-snmp/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.6 2004/02/25 21:50:40 christos Exp $
+$NetBSD: distinfo,v 1.7 2004/04/14 21:48:49 danw Exp $
SHA1 (net-snmp-5.0.9.tar.gz) = bb27bdf38da96833a3fa55f8c6a14732ab2c1991
Size (net-snmp-5.0.9.tar.gz) = 2345822 bytes
SHA1 (patch-aa) = 40ef03e182f8e8bb4f01f67f97c200c6e82f3d82
-SHA1 (patch-ab) = 94146deb60a3923481c52dc66a64a269641a1265
+SHA1 (patch-ab) = 0c6c2cd591b7264da102e7182413a5f7ed02d198
SHA1 (patch-ac) = 23696f87cf5669e52ca9c70d4a7f30f649574083
SHA1 (patch-ad) = 947bc9d8d6190584e9c7f93c2b4aeda63fd5139c
+SHA1 (patch-ae) = efc77e7985e9ac44c99e35015e2be55b0601dd4e
diff --git a/net/net-snmp/patches/patch-ab b/net/net-snmp/patches/patch-ab
index e9807e2d57a..0195e0cd8b8 100644
--- a/net/net-snmp/patches/patch-ab
+++ b/net/net-snmp/patches/patch-ab
@@ -1,19 +1,66 @@
-$NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
+$NetBSD: patch-ab,v 1.2 2004/04/14 21:48:49 danw Exp $
---- agent/mibgroup/mibII/ipv6.c 12 Sep 2003 23:10:08 -0000 1.1.1.1
-+++ agent/mibgroup/mibII/ipv6.c 13 Sep 2003 05:36:50 -0000 1.2
-@@ -1225,6 +1225,10 @@
+--- agent/mibgroup/mibII/ipv6.c.orig Fri May 17 12:05:12 2002
++++ agent/mibgroup/mibII/ipv6.c
+@@ -11,7 +11,7 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+ # if HAVE_SYS_SOCKETVAR_H
+ # include <sys/socketvar.h>
+ # endif
+@@ -80,7 +80,7 @@
+ # include <netinet6/ip6_var.h>
+ #endif
+ #include <net/route.h>
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+ # if HAVE_NETINET_IN_PCB_H
+ # include <netinet/in_pcb.h>
+ # endif
+@@ -572,7 +572,7 @@ if_getifnet(int idx, struct ifnet *resul
+ memcpy(result, &tmp, sizeof(tmp));
+ return 0;
+ }
+-#if defined(__FreeBSD__) && 3 <= __FreeBSD__
++#if (defined(__FreeBSD__) && 3 <= __FreeBSD__) || defined(darwin)
+ q = (caddr_t) TAILQ_NEXT(&tmp, if_link);
+ #else
+ # if defined(__NetBSD__) || defined(__OpenBSD__)
+@@ -801,7 +801,7 @@ var_ifv6Entry(register struct variable *
+
+ if (if_getifnet(interface, &ifnet) < 0)
+ break;
+-#if defined(__FreeBSD__) && 3 <= __FreeBSD__
++#if (defined(__FreeBSD__) && 3 <= __FreeBSD__) || defined(darwin)
+ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead);
+ #else
+ # if defined(__NetBSD__) || defined(__OpenBSD__)
+@@ -822,7 +822,7 @@ var_ifv6Entry(register struct variable *
+ *var_len = sdl.sdl_alen;
+ return (u_char *) (sdl.sdl_data + sdl.sdl_nlen);
+ }
+-#if defined(__FreeBSD__) && 3 <= __FreeBSD__
++#if (defined(__FreeBSD__) && 3 <= __FreeBSD__) || defined(darwin)
+ ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link);
+ #else
+ # if defined(__NetBSD__) || defined(__OpenBSD__)
+@@ -1225,7 +1225,11 @@ var_udp6(register struct variable * vp,
caddr_t p;
static struct in6pcb in6pcb, udb6;
int found, hitnext;
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ struct inpcbtable udbtable;
+ caddr_t first;
+#endif
- #if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
char *sysctl_buf;
struct xinpgen *xig, *oxig;
-@@ -1234,7 +1238,11 @@
+ #endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
+@@ -1234,7 +1238,11 @@ var_udp6(register struct variable * vp,
DEBUGMSGOID(("mibII/ipv6", name, *length));
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
@@ -22,22 +69,28 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
+ if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
+ return NULL;
+ first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6)))
return NULL;
p = (caddr_t) udb6.in6p_next;
-@@ -1260,7 +1268,9 @@
+@@ -1260,7 +1268,9 @@ var_udp6(register struct variable * vp,
(int) vp->namelen * sizeof(oid));
DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
while (
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p && p != first
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p && (u_long) p != auto_nlist_value("udb6")
#else
xig->xig_len > sizeof(struct xinpgen)
-@@ -1273,6 +1283,12 @@
+@@ -1268,11 +1278,17 @@ var_udp6(register struct variable * vp,
+ ) {
+ DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
+
+-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
+ klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb));
#else
in6pcb = ((struct xinpcb *) xig)->xi_inp;
#endif
@@ -50,29 +103,38 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
j = (int) vp->namelen;
for (i = 0; i < sizeof(struct in6_addr); i++)
newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
-@@ -1325,7 +1341,9 @@
+@@ -1325,13 +1341,15 @@ var_udp6(register struct variable * vp,
}
}
}
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p = (caddr_t)in6pcb.in6p_queue.cqe_next;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p = (caddr_t) in6pcb.in6p_next;
#else
xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
-@@ -1383,6 +1401,10 @@
+ #endif
+ }
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+ free(sysctl_buf);
+ #endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
+ if (!found)
+@@ -1383,7 +1401,11 @@ var_tcp6(register struct variable * vp,
int found, hitnext;
static int tcp6statemap[TCP6_NSTATES];
static int initialized = 0;
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ struct inpcbtable tcbtable;
+ caddr_t first;
+#endif
- #if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
char *sysctl_buf;
struct xinpgen *xig, *oxig;
-@@ -1407,7 +1429,11 @@
+ #endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
+@@ -1407,7 +1429,11 @@ var_tcp6(register struct variable * vp,
DEBUGMSGOID(("mibII/ipv6", name, *length));
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
@@ -81,22 +143,31 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
+ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
+ return NULL;
+ first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6)))
return NULL;
p = (caddr_t) tcb6.in6p_next;
-@@ -1433,7 +1459,9 @@
+@@ -1433,7 +1459,9 @@ var_tcp6(register struct variable * vp,
memcpy((char *) newname, (char *) vp->name,
(int) vp->namelen * sizeof(oid));
while (
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p && p != first
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p && (u_long) p != auto_nlist_value("tcb6")
#else
xig->xig_len > sizeof(struct xinpgen)
-@@ -1450,6 +1478,12 @@
+@@ -1441,7 +1469,7 @@ var_tcp6(register struct variable * vp,
+ ) {
+ DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
+
+-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
+ if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0) {
+ DEBUGMSGTL(("mibII/ipv6", "klookup fail for in6pcb at %x\n",
+ p));
+@@ -1450,6 +1478,12 @@ var_tcp6(register struct variable * vp,
#else
in6pcb = ((struct xinpcb *) xig)->xi_inp;
#endif
@@ -109,29 +180,38 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
if (klookup
((u_long) in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))
< 0) {
-@@ -1520,7 +1554,9 @@
+@@ -1520,13 +1554,15 @@ var_tcp6(register struct variable * vp,
}
skip:
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p = (caddr_t)in6pcb.in6p_queue.cqe_next;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p = (caddr_t) in6pcb.in6p_next;
#else
xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
-@@ -1587,6 +1623,10 @@
+ #endif
+ }
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+ free(sysctl_buf);
+ #endif
+ DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
+@@ -1587,7 +1623,11 @@ var_tcp6(register struct variable * vp,
int found, hitnext;
static int tcpstatemap[TCP_NSTATES];
static int initialized = 0;
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ struct inpcbtable tcbtable;
+ caddr_t first;
+#endif
- #if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
char *sysctl_buf;
struct xinpgen *xig, *oxig;
-@@ -1611,7 +1651,11 @@
+ #endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
+@@ -1611,7 +1651,11 @@ var_tcp6(register struct variable * vp,
DEBUGMSGOID(("mibII/ipv6", name, *length));
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
@@ -140,24 +220,27 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
+ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
+ return NULL;
+ first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6)))
return NULL;
p = (caddr_t) tcb6.in6p_next;
-@@ -1637,7 +1681,9 @@
+@@ -1637,7 +1681,9 @@ var_tcp6(register struct variable * vp,
memcpy((char *) newname, (char *) vp->name,
(int) vp->namelen * sizeof(oid));
while (
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p && p != first
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p && (u_long) p != auto_nlist_value("tcb6")
#else
xig->xig_len > sizeof(struct xinpgen)
-@@ -1647,14 +1693,20 @@
+@@ -1645,16 +1691,22 @@ var_tcp6(register struct variable * vp,
+ ) {
+ DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
- #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0)
-#else
- in6pcb = ((struct xinpcb *) xig)->xi_inp;
@@ -179,14 +262,14 @@ $NetBSD: patch-ab,v 1.1 2003/09/14 11:57:03 tron Exp $
if (klookup
((u_long) in6pcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))
< 0) {
-@@ -1725,7 +1777,9 @@
+@@ -1725,7 +1777,9 @@ var_tcp6(register struct variable * vp,
}
skip:
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p = (caddr_t)in6pcb.in6p_queue.cqe_next;
-+#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
++#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
p = (caddr_t) in6pcb.in6p_next;
#else
xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
diff --git a/net/net-snmp/patches/patch-ae b/net/net-snmp/patches/patch-ae
new file mode 100644
index 00000000000..862bb2b2599
--- /dev/null
+++ b/net/net-snmp/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 2004/04/14 21:48:49 danw Exp $
+
+--- snmplib/snmpUDPIPv6Domain.c.orig Fri Apr 9 19:14:10 2004
++++ snmplib/snmpUDPIPv6Domain.c
+@@ -36,6 +36,10 @@
+ #include <dmalloc.h>
+ #endif
+
++#if defined(darwin)
++#include <stdint.h> /* for uint8_t */
++#endif
++
+ #include <net-snmp/types.h>
+ #include <net-snmp/output_api.h>
+ #include <net-snmp/config_api.h>