summaryrefslogtreecommitdiffstats
path: root/sbin/pfctl
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-03-05 19:26:22 +0000
committerglebius <glebius@FreeBSD.org>2014-03-05 19:26:22 +0000
commit453f59d0c8b88a6478d5cf83a54775955fc836f1 (patch)
tree1a29be96d0f3155b58bce0294bf9c61378b6cadd /sbin/pfctl
parentecdc0f0c42cdfd46897cb5c87c9170fdb01f90de (diff)
downloadFreeBSD-src-453f59d0c8b88a6478d5cf83a54775955fc836f1.zip
FreeBSD-src-453f59d0c8b88a6478d5cf83a54775955fc836f1.tar.gz
Fix compilation for 32-bit machines.
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/pfctl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 632eafc..f90fd70 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <limits.h>
#include <netdb.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -791,17 +792,17 @@ pfctl_print_rule_counters(struct pf_rule *rule, int opts)
}
if (opts & PF_OPT_VERBOSE) {
printf(" [ Evaluations: %-8llu Packets: %-8llu "
- "Bytes: %-10llu States: %-6lu]\n",
+ "Bytes: %-10llu States: %-6ju]\n",
(unsigned long long)rule->evaluations,
(unsigned long long)(rule->packets[0] +
rule->packets[1]),
(unsigned long long)(rule->bytes[0] +
- rule->bytes[1]), rule->u_states_cur);
+ rule->bytes[1]), (uintmax_t)rule->u_states_cur);
if (!(opts & PF_OPT_DEBUG))
printf(" [ Inserted: uid %u pid %u "
- "State Creations: %-6lu]\n",
+ "State Creations: %-6ju]\n",
(unsigned)rule->cuid, (unsigned)rule->cpid,
- rule->u_states_tot);
+ (uintmax_t)rule->u_states_tot);
}
}
@@ -903,7 +904,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
case PFCTL_SHOW_LABELS:
if (pr.rule.label[0]) {
printf("%s %llu %llu %llu %llu"
- " %llu %llu %llu %llu\n",
+ " %llu %llu %llu %ju\n",
pr.rule.label,
(unsigned long long)pr.rule.evaluations,
(unsigned long long)(pr.rule.packets[0] +
@@ -914,7 +915,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
(unsigned long long)pr.rule.bytes[0],
(unsigned long long)pr.rule.packets[1],
(unsigned long long)pr.rule.bytes[1],
- (unsigned long long)pr.rule.u_states_tot);
+ (uintmax_t)pr.rule.u_states_tot);
}
break;
case PFCTL_SHOW_RULES:
OpenPOWER on IntegriCloud