Subject: Re: Another error building -release (1.4.3_ALPHA) on i386
To: None <>
From: Felix A. Croes <>
List: current-users
Date: 08/09/2000 01:31:07
Ken Wellsch <> 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();
			    error = iplattach();
		    if (error == 0)
			    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.

Felix Croes