From owner-freebsd-current@FreeBSD.ORG Wed Oct 17 21:48:33 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BF4A16A41B for ; Wed, 17 Oct 2007 21:48:33 +0000 (UTC) (envelope-from freebsd@masm.elcom.ru) Received: from smtp.elcom.ru (smtp.elcom.ru [84.53.200.28]) by mx1.freebsd.org (Postfix) with ESMTP id E3C8713C46B for ; Wed, 17 Oct 2007 21:48:32 +0000 (UTC) (envelope-from freebsd@masm.elcom.ru) Received: by smtp.elcom.ru (Postfix, from userid 65534) id 603773D8754; Thu, 18 Oct 2007 01:48:29 +0400 (MSD) Received: from dsl-212-78.elcom.ru (dsl-212-78.elcom.ru [84.53.212.78]) by smtp.elcom.ru (Postfix) with ESMTP id 328863D870F for ; Thu, 18 Oct 2007 01:48:29 +0400 (MSD) Date: Thu, 18 Oct 2007 01:48:32 +0400 From: "Victor M. Blood" X-Mailer: The Bat! (v3.80.06) Professional Organization: Home Programming Inc. X-Priority: 3 (Normal) Message-ID: <359284519.20071018014832@masm.elcom.ru> To: All MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: ipfilter cannot be build within because warning's are present X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2007 21:48:33 -0000 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... --- 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 # include #else @@ -58,12 +58,14 @@ #include #if defined(_KERNEL) # include -# if defined(NetBSD) && (__NetBSD_Version__ >= 104000000) +# if (defined(NetBSD) && (__NetBSD_Version__ >= 104000000)) # include # 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 # else # include --- 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 # include #endif -#if (_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 400000) +#if (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199802)) || (defined(__FreeBSD_version) &&(__FreeBSD_version >= 400000)) # include #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 -- With all regards, Victor M. Blood. mailto: freebsd@masm.elcom.ru FTN: 2:5024/1.95@Fidonet.org, ICQ#3567656