kernel build failure without BPF

Sergey Kandaurov pluknet at gmail.com
Tue Aug 16 11:38:34 UTC 2011


On 14 August 2011 06:01, deeptech71 at gmail.com <deeptech71 at gmail.com> wrote:
> in the following kernel configuration (notably without ``device
> bfp''), i get the following kernel build error. which is either a bug,
> or not; just posting in case it's in someone's interest.
>
> ======== build log snippet begins ========
> ===> pfsync (all)
>
> cc -O2 -fno-strict-aliasing -pipe -march=pentium4 -Werror -D_KERNEL
> -DKLD_MODULE -nostdinc  -I/usr/src/sys/modules/pfsync/../../contrib/pf
> -DHAVE_KERNEL_OPTION_HEADERS -include
> /usr/obj/usr/src/sys/HQ/opt_global.h -I. -I@ -I@/contrib/altq
> -finline-limit=8000 --param inline-unit-growth=100 --param
> large-function-growth=1000 -fno-common  -I/usr/obj/usr/src/sys/HQ
> -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx
> -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999
> -fstack-protector -Wall -Wredundant-decls -Wnested-externs
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
> -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions
> -Wmissing-include-dirs -fdiagnostics-show-option -c
> /usr/src/sys/modules/pfsync/../../contrib/pf/net/if_pfsync.c
>
> /usr/src/sys/modules/pfsync/../../contrib/pf/net/if_pfsync.c: In
> function 'pfsync_sendout':
>
> /usr/src/sys/modules/pfsync/../../contrib/pf/net/if_pfsync.c:2163:
> error: 'm' undeclared (first use in this function)
>
> /usr/src/sys/modules/pfsync/../../contrib/pf/net/if_pfsync.c:2163:
> error: (Each undeclared identifier is reported only once
>
> /usr/src/sys/modules/pfsync/../../contrib/pf/net/if_pfsync.c:2163:
> error: for each function it appears in.)
>
> *** Error code 1
>
>
>
> Stop in /usr/src/sys/modules/pfsync.
>
> *** Error code 1

This is due to mismerge of pf4.5.
The following patch shall fix the build:

Index: sys/contrib/pf/net/if_pfsync.c
===================================================================
--- sys/contrib/pf/net/if_pfsync.c      (revision 224568)
+++ sys/contrib/pf/net/if_pfsync.c      (working copy)
@@ -2126,8 +2126,8 @@ pfsync_sendout(void)
 #else
        struct ifnet *ifp = &sc->sc_if;
 #endif
+#endif
        struct mbuf *m;
-#endif
        struct ip *ip;
        struct pfsync_header *ph;
        struct pfsync_subheader *subh;

-- 
wbr,
pluknet


More information about the freebsd-current mailing list