summaryrefslogtreecommitdiff
path: root/net/net-snmp
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-11-29 12:59:51 +0000
committerjoerg <joerg@pkgsrc.org>2013-11-29 12:59:51 +0000
commit048f2a863cd45f325f8bd28d85841a2b63a8416f (patch)
tree0a893623ba53f3c60673accf935de732de6d4df7 /net/net-snmp
parent76c7248faed69be1e2cfb43372df6aff2dd159be (diff)
downloadpkgsrc-048f2a863cd45f325f8bd28d85841a2b63a8416f.tar.gz
Fix build on -current, functionality is untested.
Diffstat (limited to 'net/net-snmp')
-rw-r--r--net/net-snmp/distinfo5
-rw-r--r--net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c50
-rw-r--r--net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c30
-rw-r--r--net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c63
4 files changed, 147 insertions, 1 deletions
diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo
index bf46b66e816..49a9aaa65ac 100644
--- a/net/net-snmp/distinfo
+++ b/net/net-snmp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.78 2013/11/05 17:40:30 joerg Exp $
+$NetBSD: distinfo,v 1.79 2013/11/29 12:59:51 joerg Exp $
SHA1 (net-snmp-5.7.2.tar.gz) = c493027907f32400648244d81117a126aecd27ee
RMD160 (net-snmp-5.7.2.tar.gz) = 392d643e9f2f42ee4fa688b4702329ad005ee12e
@@ -11,6 +11,9 @@ SHA1 (patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c) = 7fc48c58c8f5bc73ca
SHA1 (patch-agent_mibgroup_hardware_memory_memory__netbsd.c) = f04d66f823bf2b49401e6d9a62db4b39ed679907
SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = 054866e7c3ac90f183fd4a6d53763a5bba50572c
SHA1 (patch-agent_mibgroup_mibII_ipAddr.c) = cd3345a4b30fe2280d0555ee38feb5f957a55b1e
+SHA1 (patch-agent_mibgroup_mibII_ipv6.c) = d6a271145e6ba774cbc1e93caa14e3d22dc43075
+SHA1 (patch-agent_mibgroup_mibII_tcpTable.c) = f547f3fd08848803cbf7ce08a41ba463c4d02992
+SHA1 (patch-agent_mibgroup_mibII_udpTable.c) = 2eb5e5c05ecb23f69cbb0d38a31e14d5b5ddc6b7
SHA1 (patch-ai) = 04c2a487bad8705c9725ef4a62016051d3898970
SHA1 (patch-aj) = d110e996d0538d17251d39a5eed46df6944ba0fa
SHA1 (patch-ak) = 50ac67db8a9ffc16d983b4192e74db25ef439321
diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c
new file mode 100644
index 00000000000..74a11744043
--- /dev/null
+++ b/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c
@@ -0,0 +1,50 @@
+$NetBSD: patch-agent_mibgroup_mibII_ipv6.c,v 1.1 2013/11/29 12:59:51 joerg Exp $
+
+--- agent/mibgroup/mibII/ipv6.c.orig 2013-11-26 22:18:51.000000000 +0000
++++ agent/mibgroup/mibII/ipv6.c
+@@ -1336,7 +1336,11 @@ var_udp6(register struct variable * vp,
+ DEBUGMSGOID(("mibII/ipv6", name, *length));
+ DEBUGMSG(("mibII/ipv6", " %d\n", exact));
+
+-#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
++ return NULL;
++ first = p = (caddr_t)TAILQ_FIRST(&udbtable.inpt_queue);
++#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+ if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
+ return NULL;
+ first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
+@@ -1473,6 +1477,9 @@ var_udp6(register struct variable * vp,
+ #if defined(openbsd4)
+ p = (caddr_t)in6pcb.inp_queue.cqe_next;
+ if (p == first) break;
++#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ p = (caddr_t)TAILQ_NEXT(&in6pcb, in6p_queue);
++ if (p == first) break;
+ #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ p = (caddr_t)in6pcb.in6p_queue.cqe_next;
+ if (p == first) break;
+@@ -1780,7 +1787,11 @@ var_tcp6(register struct variable * vp,
+ DEBUGMSGOID(("mibII/ipv6", name, *length));
+ DEBUGMSG(("mibII/ipv6", " %d\n", exact));
+
+-#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
++ return NULL;
++ first = p = (caddr_t)TAILQ_FIRST(&tcbtable.inpt_queue);
++#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
+ return NULL;
+ first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
+@@ -1928,6 +1939,9 @@ var_tcp6(register struct variable * vp,
+ #if defined(openbsd4)
+ p = (caddr_t)in6pcb.inp_queue.cqe_next;
+ if (p == first) break;
++#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ p = (caddr_t)TAILQ_NEXT(&in6pcb, in6p_queue);
++ if (p == first) break;
+ #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+ p = (caddr_t)in6pcb.in6p_queue.cqe_next;
+ if (p == first) break;
diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c
new file mode 100644
index 00000000000..90c27733ffe
--- /dev/null
+++ b/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-agent_mibgroup_mibII_tcpTable.c,v 1.1 2013/11/29 12:59:51 joerg Exp $
+
+--- agent/mibgroup/mibII/tcpTable.c.orig 2013-11-26 22:24:01.000000000 +0000
++++ agent/mibgroup/mibII/tcpTable.c
+@@ -946,7 +946,11 @@ tcpTable_load(netsnmp_cache *cache, void
+ /*
+ * Set up a linked list
+ */
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ entry = TAILQ_FIRST(&table.inpt_queue);
++#else
+ entry = table.inpt_queue.cqh_first;
++#endif
+ while (entry) {
+
+ nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
+@@ -970,8 +974,13 @@ tcpTable_load(netsnmp_cache *cache, void
+ nnew->inp_next = tcp_head;
+ tcp_head = nnew;
+
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ if (entry == TAILQ_FIRST(&table.inpt_queue))
++ break;
++#else
+ if (entry == table.inpt_queue.cqh_first)
+ break;
++#endif
+ }
+
+ if (tcp_head) {
diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c
new file mode 100644
index 00000000000..00de5b1775f
--- /dev/null
+++ b/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c
@@ -0,0 +1,63 @@
+$NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.1 2013/11/29 12:59:51 joerg Exp $
+
+--- agent/mibgroup/mibII/udpTable.c.orig 2013-11-26 22:25:02.000000000 +0000
++++ agent/mibgroup/mibII/udpTable.c
+@@ -395,7 +395,11 @@ udpTable_next_entry( void **loop_context
+ * and update the loop context ready for the next one.
+ */
+ *data_context = (void*)entry;
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ *loop_context = (void*)TAILQ_NEXT(entry, inp_queue);
++#else
+ *loop_context = (void*)entry->INP_NEXT_SYMBOL;
++#endif
+ return index;
+ }
+
+@@ -405,7 +409,11 @@ udpTable_free(netsnmp_cache *cache, void
+ UDPTABLE_ENTRY_TYPE *p;
+ while (udp_head) {
+ p = udp_head;
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ udp_head = TAILQ_NEXT(udp_head, inp_queue);
++#else
+ udp_head = udp_head->INP_NEXT_SYMBOL;
++#endif
+ free(p);
+ }
+
+@@ -705,7 +713,11 @@ udpTable_load(netsnmp_cache *cache, void
+ /*
+ * Set up a linked list
+ */
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ entry = TAILQ_FIRST(&table.inpt_queue);
++#else
+ entry = table.inpt_queue.cqh_first;
++#endif
+ while (entry) {
+
+ nnew = SNMP_MALLOC_TYPEDEF(struct inpcb);
+@@ -717,12 +729,22 @@ udpTable_load(netsnmp_cache *cache, void
+ break;
+ }
+
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */
++ TAILQ_NEXT(nnew, inp_queue) = udp_head;
++#else
+ entry = nnew->inp_queue.cqe_next; /* Next kernel entry */
+ nnew->inp_queue.cqe_next = udp_head;
++#endif
+ udp_head = nnew;
+
++#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800
++ if (entry == TAILQ_FIRST(&table.inpt_queue))
++ break;
++#else
+ if (entry == table.inpt_queue.cqh_first)
+ break;
++#endif
+ }
+
+ if (udp_head) {