3c3cb3b7d0
(this is ugly code, should use ioctl instead of kvm) bump PKGREVISION
26 lines
857 B
Text
26 lines
857 B
Text
$NetBSD: patch-ca,v 1.2 2009/04/07 11:26:48 drochner Exp $
|
|
|
|
--- sysdeps/bsd/netload.c.orig 2008-05-24 00:13:21.000000000 +0200
|
|
+++ sysdeps/bsd/netload.c
|
|
@@ -220,8 +220,12 @@ glibtop_get_netload_p (glibtop *server,
|
|
sin = (struct sockaddr_in *)sa;
|
|
#if !defined(__bsdi__)
|
|
/* Commenting out to "fix" #13345. */
|
|
+#ifdef __NetBSD__
|
|
+ buf->subnet = ifaddr.in.ia_subnet;
|
|
+#else
|
|
buf->subnet = htonl (ifaddr.in.ia_subnet);
|
|
#endif
|
|
+#endif
|
|
buf->address = sin->sin_addr.s_addr;
|
|
buf->mtu = ifnet.if_mtu;
|
|
|
|
@@ -233,7 +237,7 @@ glibtop_get_netload_p (glibtop *server,
|
|
buf->flags |= GLIBTOP_NETLOAD_ADDRESS6;
|
|
}
|
|
/* FIXME prefix6, scope6 */
|
|
-#if defined (__OpenBSD__)
|
|
+#if defined (__OpenBSD__) || defined(__NetBSD__)
|
|
ifaddraddr = (u_long) ifaddr.ifa.ifa_list.tqe_next;
|
|
#else
|
|
ifaddraddr = (u_long) ifaddr.ifa.ifa_link.tqe_next;
|