>Number: 186766
>Category: bin
>Synopsis: [patch] sbin/pfctl fails to build
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 14 15:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Takanori Sawada
>Release: FreeBSD 10.0-RELEASE
>Organization:
>Environment:
FreeBSD localhost.localdomain 10.0-RELEASE FreeBSD 10.0-RELEASE #12 r261181:
Tue Feb 4 02:18:49 JST 2014
[email protected]:/usr/obj/usr/src/sys/ProLiant_ML110_G7 amd64
>Description:
FreeBSD Current Source sbin/pfctl fails to build.
--- usr.sbin.all__D ---
--- sdpd.8.gz ---
gzip -cn /home/tak/share/github/freebsd/usr.sbin/bluetooth/sdpd/sdpd.8 >
sdpd.8.gz
--- sbin.all__D ---
--- pfctl.o ---
cc -O2 -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes
-Wno-uninitialized -Wstrict-prototypes -DENABLE_ALTQ
-I/home/tak/share/github/freebsd/sbin/pfctl -DWITH_INET6 -DWITH_INET -std=gnu99
-Qunused-arguments -Wsystem-headers -Werr
or -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body
-Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch
-Wno-switch-enu
m -Wno-knr-promoted-parameter -c
/home/tak/share/github/freebsd/sbin/pfctl/pfctl.c
--- usr.sbin.all__D ---
--- sdpd ---
cc -O2 -fno-strict-aliasing -pipe
-I/home/tak/share/github/freebsd/usr.sbin/bluetooth/sdpd -std=gnu99
-Qunused-arguments -Wsystem-headers -Werror -Wall -Wno-format-y2k
-Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-pl
us-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum
-Wno-knr-promoted-parameter -o sdpd bgd.o dun.o ftrn.o gn.o irmc.o
irmc_command.o lan.o l
og.o main.o nap.o opush.o panu.o profile.o provider.o sar.o scr.o sd.o server.o
sp.o srr.o ssar.o ssr.o sur.o uuid.o
===> usr.sbin/bootparamd (all)
--- all ---
===> usr.sbin/bootparamd/bootparamd (all)
--- sbin.all__D ---
/home/tak/share/github/freebsd/sbin/pfctl/pfctl.c:799:25: error: format
specifies type 'unsigned long' but the argument has type 'uint64_t' (aka
'unsigned long long') [-Werror,-Wformat]
rule->bytes[1]), (uint64_t)rule->states_cur);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tak/share/github/freebsd/sbin/pfctl/pfctl.c:804:8: error: format
specifies type 'unsigned long' but the argument has type 'uint64_t' (aka
'unsigned long long') [-Werror,-Wformat]
(uint64_t)rule->states_tot);
^~~~~~~~~~~~~~~~~~~~~~~~~~
--- usr.sbin.all__D ---
--- bootparams.5.gz ---
gzip -cn
/home/tak/share/github/freebsd/usr.sbin/bootparamd/bootparamd/bootparams.5 >
bootparams.5.gz
--- bootparamd.8.gz ---
gzip -cn
/home/tak/share/github/freebsd/usr.sbin/bootparamd/bootparamd/bootparamd.8 >
bootparamd.8.gz
--- rescue.all__D ---
--- printpool_live.o ---
cc -O2 -fno-strict-aliasing -pipe -I. -DIPFILTER_BPF -DHAS_SYS_MD5_H
-I/home/tak/share/github/freebsd/sbin/ipf/ipf/../../../contrib/ipfilter
-I/home/tak/share/github/freebsd/sbin/ipf/ipf/../../../contrib/ipfilter/tools
-I/home/tak/share
/github/freebsd/sbin/ipf/ipf/../../../sys
-I/home/tak/share/github/freebsd/sbin/ipf/ipf/../../../sys/contrib/ipfilter
-DSTATETOP -D__UIO_EXPOSE -DRESCUE -std=gnu99 -Qunused-arguments
-Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-un
initialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum
-Wno-knr-promoted-parameter -W
no-array-bounds -Wno-format -c
/home/tak/share/github/freebsd/sbin/ipf/ipf/../../../contrib/ipfilter/lib/printpool_live.c
--- sbin.all__D ---
2 errors generated.
*** [pfctl.o] Error code 1
make[4]: stopped in /home/tak/share/github/freebsd/sbin/pfctl
1 error
http://svnweb.freebsd.org/base/head/sbin/pfctl/pfctl.c?revision=261882&view=markup#l792
>How-To-Repeat:
>Fix:
Patch attached.
Patch attached with submission follows:
--- pfctl.c.orig 2014-02-14 23:32:07.000000000 +0900
+++ pfctl.c 2014-02-14 23:42:52.000000000 +0900
@@ -50,8 +50,10 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <limits.h>
#include <netdb.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -791,7 +793,7 @@
}
if (opts & PF_OPT_VERBOSE) {
printf(" [ Evaluations: %-8llu Packets: %-8llu "
- "Bytes: %-10llu States: %-6lu]\n",
+ "Bytes: %-10llu States: %-6"PRIu64"]\n",
(unsigned long long)rule->evaluations,
(unsigned long long)(rule->packets[0] +
rule->packets[1]),
@@ -799,7 +801,7 @@
rule->bytes[1]), (uint64_t)rule->states_cur);
if (!(opts & PF_OPT_DEBUG))
printf(" [ Inserted: uid %u pid %u "
- "State Creations: %-6lu]\n",
+ "State Creations: %-6"PRIu64"]\n",
(unsigned)rule->cuid, (unsigned)rule->cpid,
(uint64_t)rule->states_tot);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"