blob: 24469595725f7fa9f90314bd221a8eb934c7aa2d (
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
|
$NetBSD: patch-bo,v 1.5 2009/05/19 23:44:55 asau Exp $
--- src/host.c.orig 2004-01-14 19:50:55.000000000 +0100
+++ src/host.c 2007-10-14 13:31:44.000000000 +0200
@@ -978,7 +978,7 @@ iflist(alp, np)
#ifdef OSIOCGIFCONF
#if defined(IMA_RS6K) || defined(IMA_RS6KMP) || defined(IMA_SP2MPI) \
|| defined(IMA_AIX4SP2) || defined(IMA_AIX5SP2) \
- || defined(IMA_FREEBSD)
+ || defined(IMA_FREEBSD) || defined(IMA_DRAGONFLY)
SIOCGIFCONF
#else
OSIOCGIFCONF
@@ -992,7 +992,7 @@ iflist(alp, np)
}
for (cp = sif.ifc_ifcu.ifcu_buf;
- cp - sif.ifc_ifcu.ifcu_buf < sif.ifc_len;
+ cp - (char *)sif.ifc_ifcu.ifcu_buf < sif.ifc_len;
cp += sizeof(*reqp) - sizeof(struct sockaddr) + SIZ(reqp->ifr_addr))
{
reqp = (struct ifreq*)cp;
@@ -1005,7 +1005,11 @@ iflist(alp, np)
}
/* On some FreeBSD systems: */
/* if (IFF_UP & req.ifr_flags) { */
+#if defined(IMA_FREEBSD) || defined(IMA_DRAGONFLY)
+ if (IFF_UP & req.ifr_flags) {
+#else
if (IFF_UP & req.ifr_ifru.ifru_flags) {
+#endif
if (nip > 0 && !(nip % 10))
iplist = TREALLOC(iplist, (nip + 10), struct in_addr);
iplist[nip++] =
|