From df46cd0137364e4785e96653257392f0d1ea003f Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Mon, 27 Oct 2014 10:13:42 +0100 Subject: [PATCH] Recent NetBSD versions also use a TAILQ. --- src/tcpconns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tcpconns.c b/src/tcpconns.c index 6f14bce6..f716a103 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -951,7 +951,7 @@ static int conn_init (void) static int conn_read (void) { struct inpcbtable table; -#ifndef __OpenBSD__ +#ifdef __OpenBSD__ || __NetBSD_Version__ > 699002700 struct inpcb *head; #endif struct inpcb *next; @@ -966,7 +966,7 @@ static int conn_read (void) if (status != 0) return (-1); -#ifdef __OpenBSD__ +#ifdef __OpenBSD__ || __NetBSD_Version__ > 699002700 /* inpt_queue is a TAILQ on OpenBSD */ /* Get the first pcb */ next = (struct inpcb *)TAILQ_FIRST (&table.inpt_queue); @@ -984,7 +984,7 @@ static int conn_read (void) kread ((u_long) next, &inpcb, sizeof (inpcb)); /* Advance `next' */ -#ifdef __OpenBSD__ +#ifdef __OpenBSD__ || __NetBSD_Version__ > 699002700 /* inpt_queue is a TAILQ on OpenBSD */ next = (struct inpcb *)TAILQ_NEXT (&inpcb, inp_queue); #else -- 2.11.0