ipfilter cannot be build within because warning's are present

Max Laier max at love2party.net
Wed Oct 17 14:57:22 PDT 2007


On Wednesday 17 October 2007, Victor M. Blood wrote:
> Hi, All.
>
> I try to use options in kernel instead of a module build of the
> ipfilter and got error then kernel builds.
>
> I'm edit files: fil.c, ip_auth.h, ip_auth.h, ip_log.c ip_compat.h and
> correct #ifdef statament :) no more warnings...

ipf is likely broken anyway.  See thread: "7.0 CURRENT, need help with 
panic: Trying sleep, but thread marked as sleeping prohibited" on this ML 
a few days back.  That this warning went unnoticed tells you something, 
too.

> --- sys/contrib/ipfilter/netinet/ip_log.c.orig  2007-10-18
> 01:28:36.000000000 +0400 +++ sys/contrib/ipfilter/netinet/ip_log.c     
>  2007-10-18 01:30:47.000000000 +0400 @@ -49,7 +49,7 @@
>  # undef _KERNEL
>  # undef KERNEL
>  #endif
> -#if __FreeBSD_version >= 220000 && defined(_KERNEL)
> +#if (defined(__FreeBSD_version) && (__FreeBSD_version >= 220000)) &&
> defined(_KERNEL) # include <sys/fcntl.h>
>  # include <sys/filio.h>
>  #else
> @@ -58,12 +58,14 @@
>  #include <sys/time.h>
>  #if defined(_KERNEL)
>  # include <sys/systm.h>
> -# if defined(NetBSD) && (__NetBSD_Version__ >= 104000000)
> +# if (defined(NetBSD) && (__NetBSD_Version__ >= 104000000))
>  #  include <sys/proc.h>
>  # endif
>  #endif /* _KERNEL */
>  #if !SOLARIS && !defined(__hpux) && !defined(linux)
> -# if (NetBSD > 199609) || (OpenBSD > 199603) || (__FreeBSD_version >=
> 300000) +# if (defined(NetBSD) && (NetBSD > 199609)) || \
> +       (defined(OpenBSD) && (OpenBSD > 199603)) || \
> +       (defined(__FreeBSD_version) && (__FreeBSD_version >= 300000))
>  #  include <sys/dirent.h>
>  # else
>  #  include <sys/dir.h>
> --- sys/contrib/ipfilter/netinet/fil.c.orig     2007-10-18
> 01:27:16.000000000 +0400 +++ sys/contrib/ipfilter/netinet/fil.c 
> 2007-10-18 01:30:38.000000000 +0400 @@ -2509,7 +2509,7 @@
>         } else
>  #endif
>         {
> -#if (OpenBSD >= 200311) && defined(_KERNEL)
> +#if (defined(OpenBSD) && (OpenBSD >= 200311)) && defined(_KERNEL)
>                 ip->ip_len = ntohs(ip->ip_len);
>                 ip->ip_off = ntohs(ip->ip_off);
>  #endif
> @@ -2772,7 +2772,7 @@
>         RWLOCK_EXIT(&ipf_global);
>
>  #ifdef _KERNEL
> -# if OpenBSD >= 200311
> +# if (defined(OpenBSD) && (OpenBSD >= 200311))
>         if (FR_ISPASS(pass) && (v == 4)) {
>                 ip = fin->fin_ip;
>                 ip->ip_len = ntohs(ip->ip_len);
> --- sys/contrib/ipfilter/netinet/ip_auth.c.orig 2007-10-18
> 01:28:03.000000000 +0400 +++ sys/contrib/ipfilter/netinet/ip_auth.c    
>  2007-10-18 01:30:30.000000000 +0400 @@ -50,7 +50,7 @@
>  # include <sys/stream.h>
>  # include <sys/kmem.h>
>  #endif
> -#if (_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 400000)
> +#if (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802)) ||
> (defined(__FreeBSD_version) &&(__FreeBSD_version >= 400000)) # include
> <sys/queue.h>
>  #endif
>  #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)
> --- sys/contrib/ipfilter/netinet/ip_compat.h.orig       2007-10-18
> 01:29:24.000000000 +0400 +++ sys/contrib/ipfilter/netinet/ip_compat.h  
>  2007-10-18 01:30:56.000000000 +0400 @@ -34,7 +34,7 @@
>  #ifndef        SOLARIS
>  #define        SOLARIS (defined(sun) && (defined(__svr4__) ||
> defined(__SVR4))) #endif
> -#if SOLARIS2 >= 8
> +#if (defined(SOLARIS2) && (SOLARIS2 >= 8))
>  # ifndef       USE_INET6
>  #  define      USE_INET6
>  # endif



-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071017/848052e8/attachment.pgp


More information about the freebsd-current mailing list