Re: ipfilter cannot be build within because warning's are present

From: Max Laier <max_at_love2party.net>
Date: Wed, 17 Oct 2007 23:57:10 +0200
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 _at__at_ -49,7 +49,7 _at__at_
>  # 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
> _at__at_ -58,12 +58,14 _at__at_
>  #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 _at__at_ -2509,7 +2509,7 _at__at_
>         } 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
> _at__at_ -2772,7 +2772,7 _at__at_
>         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 _at__at_ -50,7 +50,7 _at__at_
>  # 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 _at__at_ -34,7 +34,7 _at__at_
>  #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

Received on Wed Oct 17 2007 - 19:57:22 UTC

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