Subject: Re: Another error building -release (1.4.3_ALPHA) on i386
To: None <current-users@netbsd.org>
From: Felix A. Croes <felix@dworkin.nl>
List: current-users
Date: 08/09/2000 01:31:07
Ken Wellsch <kwellsch@tampabay.rr.com> wrote:
> After turning off MSDOSFS and continuing with a "make build" I got this:
>
> cc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Werror -I/usr/src/usr.sbin/ipf/ipftest/../../../dist/ipf -I/usr/src/usr.sbin/ipf/ipftest/../../../sys -I/usr/src/usr.sbin/ipf/ipftest/../../../sys/netinet -c /usr/src/usr.sbin/ipf/ipftest/../../../sys/netinet/ip_fil.c
> cc1: warnings being treated as errors
> /usr/src/usr.sbin/ipf/ipftest/../../../sys/netinet/ip_fil.c: In function `iplioctl':
> /usr/src/usr.sbin/ipf/ipftest/../../../sys/netinet/ip_fil.c:440:
> warning: implicit declaration of function `ipl_enable'
The offending code, with my fix, appears below:
#ifdef _KERNEL
/*
* If we're doing a NAT operation, implicitly enable
* IP Filter if not already enabled. We do this
* because filtering and NAT are really separate
* operations, and it's not entirely obvious from
* a user's point of view that you need to enable
* the filter in order to enable NAT.
*
* Since the default rule is to pass all packets,
* this shouldn't cause any noticeable side-effects.
*/
if (fr_running == 0)
#ifdef __NetBSD__
error = ipl_enable();
#else
error = iplattach();
#endif
if (error == 0)
#endif
error = nat_ioctl(data, cmd, mode);
This appears to have been fixed incorrectly in NetBSD-current,
where the __NetBSD__ conditional is missing; also the test for
`fr_running' is outside of the _KERNEL conditional, though it has
no meaningful value outside of the kernel environment.
Regards,
Felix Croes