$NetBSD: patch-aa,v 1.2 2006/03/06 23:02:07 peter Exp $

--- pfstat.c.orig	2003-09-10 19:45:27.000000000 +0200
+++ pfstat.c	2006-03-06 23:50:43.000000000 +0100
@@ -37,7 +37,12 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <net/if.h>
+#ifdef __DragonFly__
+#include <net/pf/pfvar.h>
+#else
 #include <net/pfvar.h>
+#endif
+
 #include <err.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -167,26 +172,26 @@
 	}
 	close(dev);
 	if (s.running) {
-		printf("%u %u", time(NULL), s.since);
+		printf("%u %u", (unsigned int)time(NULL), s.since);
 		printf(" %llu %llu %llu %llu",
-		    s.bcounters[0][0],
-		    s.bcounters[0][1],
-		    s.bcounters[1][0],
-		    s.bcounters[1][1]);
+		    (unsigned long long)s.bcounters[0][0],
+		    (unsigned long long)s.bcounters[0][1],
+		    (unsigned long long)s.bcounters[1][0],
+		    (unsigned long long)s.bcounters[1][1]);
 		printf(" %llu %llu %llu %llu %llu %llu %llu %llu",
-		    s.pcounters[0][0][PF_PASS],
-		    s.pcounters[0][0][PF_DROP],
-		    s.pcounters[0][1][PF_PASS],
-		    s.pcounters[0][1][PF_DROP],
-		    s.pcounters[1][0][PF_PASS],
-		    s.pcounters[1][0][PF_DROP],
-		    s.pcounters[1][1][PF_PASS],
-		    s.pcounters[1][1][PF_DROP]);
+		    (unsigned long long)s.pcounters[0][0][PF_PASS],
+		    (unsigned long long)s.pcounters[0][0][PF_DROP],
+		    (unsigned long long)s.pcounters[0][1][PF_PASS],
+		    (unsigned long long)s.pcounters[0][1][PF_DROP],
+		    (unsigned long long)s.pcounters[1][0][PF_PASS],
+		    (unsigned long long)s.pcounters[1][0][PF_DROP],
+		    (unsigned long long)s.pcounters[1][1][PF_PASS],
+		    (unsigned long long)s.pcounters[1][1][PF_DROP]);
 		printf(" %u", s.states);
 		for (i = 0; i < FCNT_MAX; ++i)
-			printf(" %lld", s.fcounters[i]);
+			printf(" %lld", (long long)s.fcounters[i]);
 		for (i = 0; i < PFRES_MAX; ++i)
-			printf(" %lld", s.counters[i]);
+			printf(" %lld", (long long)s.counters[i]);
 		printf("\n");
 	}
 	return (0);
