$OpenBSD: patch-agent_mibgroup_mibII_udpTable_c,v 1.5 2014/12/09 15:20:06 sthen Exp $ --- agent/mibgroup/mibII/udpTable.c.orig Mon Dec 8 16:23:22 2014 +++ agent/mibgroup/mibII/udpTable.c Tue Jun 12 04:18:18 2018 @@ -64,9 +64,12 @@ struct netsnmp_udpEntry_s { #ifdef linux #define INP_NEXT_SYMBOL inp_next #endif -#ifdef openbsd4 -#define INP_NEXT_SYMBOL inp_queue.cqe_next /* or set via */ +#if defined(openbsd4) +#define INP_NEXT_SYMBOL inp_queue.tqe_next /* or set via */ #endif +#if defined(fabbsd) +#define INP_NEXT_SYMBOL inp_queue.cqe_next +#endif #if defined(freebsd4) || defined(darwin) || defined(osf5) typedef struct netsnmp_inpcb_s netsnmp_inpcb; @@ -706,7 +709,7 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) /* * Set up a linked list */ - entry = table.inpt_queue.cqh_first; + entry = TAILQ_FIRST(&table.inpt_queue); while (entry) { nnew = SNMP_MALLOC_TYPEDEF(struct inpcb); @@ -718,11 +721,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) break; } - entry = nnew->inp_queue.cqe_next; /* Next kernel entry */ - nnew->inp_queue.cqe_next = udp_head; + entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */ + nnew->inp_queue.tqe_next = udp_head; udp_head = nnew; - if (entry == table.inpt_queue.cqh_first) + if (entry == NULL) break; }