$NetBSD: patch-ad,v 1.15 2011/05/04 20:31:40 adam Exp $ --- dlls/iphlpapi/ipstats.c.orig 2010-12-10 22:33:07.000000000 +0300 +++ dlls/iphlpapi/ipstats.c 2010-12-22 00:38:30.000000000 +0300 @@ -27,6 +27,10 @@ #include #include #include +#if defined(__NetBSD__) +#include +#endif +#include #ifdef HAVE_ALIAS_H #include #endif @@ -489,7 +493,7 @@ } if (kc) kstat_close( kc ); } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && !defined(__NetBSD__) { int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS}; #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) @@ -655,7 +659,7 @@ } if (kc) kstat_close( kc ); } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) && !defined(__NetBSD__) { int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS}; #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) @@ -804,7 +808,7 @@ } if (kc) kstat_close( kc ); } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__) { #ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */ #define TCPTV_MIN 2 @@ -915,7 +919,7 @@ } if (kc) kstat_close( kc ); } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__) { int mib[] = {CTL_NET, PF_INET, IPPROTO_UDP, UDPCTL_STATS}; #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) @@ -1347,7 +1351,7 @@ } else ret = ERROR_NOT_SUPPORTED; } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) && !defined(__NetBSD__) { int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; #define MIB_LEN (sizeof(mib) / sizeof(mib[0]))