Subject: kern/34287: ipf/ippool enabled kernel fails build.sh build due to use of "version" variable name
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <yancm@sdf.lonestar.org>
List: netbsd-bugs
Date: 08/26/2006 02:25:00
>Number:         34287
>Category:       kern
>Synopsis:       ipf/ippool enabled kernel fails build.sh build due to use of "version" variable name
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 26 02:25:00 +0000 2006
>Originator:     Gene ENonymous
>Release:        Current
>Organization:
>Environment:
NetBSD bloody 4.99.1 NetBSD 4.99.1 (BLOODY) #0: Thu Aug 24 05:38:08 EDT 2006  root@bloody:/usr/obj/sys/arch/i386/compile/BLOODY i386
>Description:
When I enabled ippool, by adding "options IPFILTER_LOOKUP" to GENERIC, 
the kernel build failed because subroutines in the following files:
  /usr/src/sys/dist/ipf/netinet/ip_htable.c
  /usr/src/sys/dist/ipf/netinet/ip_pool.c
contained redeclarations of "version" which shadowed a global extern
in one of the system .h files (sorry, I already forgot which...try the 
compile and it will tell you).
>How-To-Repeat:
1) Add options IPFILTER_LOOKUP to the GENERIC kernel config
2) build the kernel with build shell
   ./build.sh -O ../obj -T ../tools kernel=GENERIC
you will get a build failed message at:
  /usr/src/sys/dist/ipf/netinet/ip_htable.c
    and if you fix that, again at:
  /usr/src/sys/dist/ipf/netinet/ip_pool.c

>Fix:
My fix was to rename the variable in the subroutines from "version"
to "ipversion" (since this was just an int that held 4 or 6 depending
on which version ip protocol was being processed).

Once I did that the compiles proceeded.

I can verify that pr's 34283, 34284 and 34286 apply to current
as well as 3_Stable