$NetBSD: patch-ae,v 1.1 2009/06/04 07:54:26 hasso Exp $

--- bsd/getifstats.c.orig	2009-05-07 11:38:00 +0300
+++ bsd/getifstats.c	2009-05-07 11:40:14 +0300
@@ -11,10 +11,14 @@
 #include <net/if.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <net/if_var.h>
 #endif
+#if defined(__DragonFly__)
+#include <net/pf/pfvar.h>
+#else
 #include <net/pfvar.h>
+#endif
 #include <kvm.h>
 #include <fcntl.h>
 #include <nlist.h>
@@ -34,7 +38,7 @@ struct nlist list[] = {
 int 
 getifstats(const char * ifname, struct ifdata * data)
 {
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 	struct ifnethead ifh;
 #elif defined(__OpenBSD__) || defined(__NetBSD__)
 	struct ifnet_head ifh;
