blob: 770e2a32cf2bd2433328953462d91b309ace9a5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
$NetBSD: patch-ac,v 1.3 2004/01/04 12:59:40 tron Exp $
--- src/kernel/netbsd.c.orig 2003-02-12 03:15:59.000000000 +0100
+++ src/kernel/netbsd.c 2004-01-04 13:57:58.000000000 +0100
@@ -29,6 +29,7 @@
#include <errno.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <netinet/in.h>
@@ -162,7 +163,7 @@
if (tcbtablep == NULL)
return (NULL);
- kpcbp = tcbtablep->inpt_queue.cqh_first;
+ kpcbp = (struct inpcb *) tcbtablep->inpt_queue.cqh_first;
while (kpcbp != (struct inpcb *) ktcbtablep) {
if (getbuf((u_long) kpcbp, &pcb, sizeof(struct inpcb)) == -1)
break;
@@ -185,7 +186,7 @@
return (pcb.inp_socket);
}
- kpcbp = pcb.inp_queue.cqe_next;
+ kpcbp = (struct inpcb *) pcb.inp_queue.cqe_next;
}
return (NULL);
@@ -351,7 +352,11 @@
return (tcb6_temp.in6p_socket);
}
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /* 1.6Y */
+ tcb6_cur = (struct in6pcb *) tcb6_temp.in6p_queue.cqe_next;
+#else
tcb6_cur = tcb6_temp.in6p_next;
+#endif
if (getbuf((u_long) tcb6_cur, &tcb6_temp, sizeof(tcb6_temp)) == -1)
break;
} while ((u_long) tcb6_cur != kinfo->nl[N_TCB6].n_value);
|