$OpenBSD: patch-sysdeps_bsd_netload_c,v 1.3 2010/04/17 07:51:01 ajacoutot Exp $ --- sysdeps/bsd/netload.c.orig Sun Apr 19 19:51:00 2009 +++ sysdeps/bsd/netload.c Sat Apr 17 09:45:18 2010 @@ -220,7 +220,13 @@ glibtop_get_netload_p (glibtop *server, glibtop_netloa sin = (struct sockaddr_in *)sa; #if !defined(__bsdi__) /* Commenting out to "fix" #13345. */ +#if defined(__NetBSD__) + buf->subnet = ifaddr.in.ia_net; +#elif defined(__OpenBSD__) + buf->subnet = ifaddr.in.ia_netmask; +#else buf->subnet = htonl (ifaddr.in.ia_subnet); +#endif #endif buf->address = sin->sin_addr.s_addr; buf->mtu = ifnet.if_mtu;