Re: kernel build failure without BPF

From: Sergey Kandaurov <pluknet_at_gmail.com>
Date: Tue, 16 Aug 2011 15:38:33 +0400
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_at_ -I_at_/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)
_at__at_ -2126,8 +2126,8 _at__at_ 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
Received on Tue Aug 16 2011 - 09:38:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC