$NetBSD: patch-ad,v 1.14 2010/02/20 08:35:58 schwarz Exp $

--- dlls/iphlpapi/ipstats.c.orig	2008-10-17 17:45:25.000000000 +0200
+++ dlls/iphlpapi/ipstats.c	2010-02-19 23:39:54.000000000 +0100
@@ -28,6 +28,10 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#endif
+#include <unistd.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -755,7 +759,11 @@
 
       /* Ignore all entries except for gateway routes which aren't
          multicast */
+#if !defined(RTF_MULTICAST)
+      if (!(rtm->rtm_flags & RTF_GATEWAY))
+#else
       if (!(rtm->rtm_flags & RTF_GATEWAY) || (rtm->rtm_flags & RTF_MULTICAST))
+#endif
          continue;
 
       RouteCount++;
@@ -831,8 +839,12 @@
 
           /* Ignore all entries except for gateway routes which aren't
              multicast */
+#if !defined(RTF_MULTICAST)
+          if (!(rtm->rtm_flags & RTF_GATEWAY))
+#else
           if (!(rtm->rtm_flags & RTF_GATEWAY) ||
               (rtm->rtm_flags & RTF_MULTICAST))
+#endif
              continue;
 
           memset (&table->table[table->dwNumEntries], 0,
