summaryrefslogtreecommitdiffstats
path: root/sys/contrib/ipfilter/netinet
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-04 10:06:06 +0000
committerru <ru@FreeBSD.org>2005-12-04 10:06:06 +0000
commit798500dfd84901b8d5d22e9a99c47e96fe8b9ec5 (patch)
treeacd04a6feb972f86071cbebb5420c10b69d82de9 /sys/contrib/ipfilter/netinet
parent1c586a3c0b58f2748ced33998d3565a41faee657 (diff)
downloadFreeBSD-src-798500dfd84901b8d5d22e9a99c47e96fe8b9ec5.zip
FreeBSD-src-798500dfd84901b8d5d22e9a99c47e96fe8b9ec5.tar.gz
Fix -Wundef from compiling the amd64 LINT.
Diffstat (limited to 'sys/contrib/ipfilter/netinet')
-rw-r--r--sys/contrib/ipfilter/netinet/fil.c4
-rw-r--r--sys/contrib/ipfilter/netinet/ip_auth.c6
-rw-r--r--sys/contrib/ipfilter/netinet/ip_compat.h23
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.h10
-rw-r--r--sys/contrib/ipfilter/netinet/ip_log.c4
5 files changed, 26 insertions, 21 deletions
diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c
index 1233c6f..29e4aac 100644
--- a/sys/contrib/ipfilter/netinet/fil.c
+++ b/sys/contrib/ipfilter/netinet/fil.c
@@ -2287,7 +2287,7 @@ int out;
} 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
@@ -2499,7 +2499,7 @@ finished:
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);
diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c
index bb8705c..a5e5c58 100644
--- a/sys/contrib/ipfilter/netinet/ip_auth.c
+++ b/sys/contrib/ipfilter/netinet/ip_auth.c
@@ -52,7 +52,8 @@ struct file;
# include <sys/stream.h>
# include <sys/kmem.h>
#endif
-#if (_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 400000)
+#if (defined(_BSDI_VERSION) && _BSDI_VERSION >= 199802) || \
+ (__FreeBSD_version >= 400000)
# include <sys/queue.h>
#endif
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)
@@ -510,7 +511,8 @@ fr_authioctlloop:
# else /* MENTAT */
# ifdef linux
# else
-# if (_BSDI_VERSION >= 199802) || defined(__OpenBSD__) || \
+# if (defined(_BSDI_VERSION) && _BSDI_VERSION >= 199802) || \
+ (defined(__OpenBSD__)) || \
(defined(__sgi) && (IRIX >= 60500) || \
(defined(__FreeBSD__) && (__FreeBSD_version >= 470102)))
error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL,
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h
index 2afa333..1bd24ff 100644
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ b/sys/contrib/ipfilter/netinet/ip_compat.h
@@ -1,5 +1,3 @@
-/* $FreeBSD$ */
-
/*
* Copyright (C) 1993-2001, 2003 by Darren Reed.
*
@@ -37,7 +35,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
@@ -142,7 +140,7 @@ struct file;
# include <sys/ioccom.h>
# include <sys/sysmacros.h>
# include <sys/kmem.h>
-# if SOLARIS2 >= 10
+# if defined(SOLARIS2) && SOLARIS2 >= 10
# include <sys/procset.h>
# include <sys/proc.h>
# include <sys/devops.h>
@@ -156,7 +154,7 @@ struct file;
# undef RES_INIT
# endif /* _KERNEL */
-# if SOLARIS2 >= 8
+# if defined(SOLARIS2) && SOLARIS2 >= 8
# include <netinet/ip6.h>
# include <netinet/icmp6.h>
# endif
@@ -177,7 +175,7 @@ struct file;
# ifndef KERNEL
# undef _KERNEL
# endif
-# if SOLARIS2 >= 8
+# if defined(SOLARIS2) && SOLARIS2 >= 8
# define SNPRINTF snprintf
# include <inet/ip_if.h>
@@ -192,7 +190,7 @@ struct ip6_ext {
};
# endif /* SOLARIS2 >= 8 */
-# if SOLARIS2 >= 6
+# if defined(SOLARIS2) && SOLARIS2 >= 6
# include <sys/atomic.h>
typedef uint32_t u_32_t;
# else
@@ -205,7 +203,7 @@ typedef unsigned int u_32_t;
# define KMUTEX_T kmutex_t
# include "qif.h"
# include "pfil.h"
-# if SOLARIS2 >= 6
+# if defined(SOLARIS2) && SOLARIS2 >= 6
# if SOLARIS2 == 6
# define ATOMIC_INCL(x) atomic_add_long((uint32_t*)&(x), 1)
# define ATOMIC_DECL(x) atomic_add_long((uint32_t*)&(x), -1)
@@ -278,7 +276,7 @@ extern void *get_unit __P((char *, int));
typedef mblk_t mb_t;
# endif /* _KERNEL */
-# if (SOLARIS2 >= 7)
+# if defined(SOLARIS2) && (SOLARIS2 >= 7)
# ifdef lint
# define ALIGN32(ptr) (ptr ? 0L : 0L)
# define ALIGN16(ptr) (ptr ? 0L : 0L)
@@ -288,7 +286,7 @@ typedef mblk_t mb_t;
# endif
# endif
-# if SOLARIS2 < 6
+# if defined(SOLARIS2) && SOLARIS2 < 6
typedef struct uio uio_t;
# endif
typedef int ioctlcmd_t;
@@ -1222,7 +1220,10 @@ typedef u_int32_t u_32_t;
* For BSD kernels, if bpf is in the kernel, enable ipfilter to use bpf in
* filter rules.
*/
-#if !defined(IPFILTER_BPF) && ((NBPF > 0) || (NBPFILTER > 0) || (DEV_BPF >0))
+#if !defined(IPFILTER_BPF) && \
+ ((defined(NBPF) && NBPF > 0) || \
+ (defined(NBPFILTER) && NBPFILTER > 0) || \
+ (defined(DEV_BPF) && DEV_BPF >0))
# define IPFILTER_BPF
#endif
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h
index 5eaab63..eb50a8e 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.h
+++ b/sys/contrib/ipfilter/netinet/ip_fil.h
@@ -1,5 +1,3 @@
-/* $FreeBSD$ */
-
/*
* Copyright (C) 1993-2001, 2003 by Darren Reed.
*
@@ -1108,7 +1106,7 @@ typedef struct ipftune {
#if (defined(NetBSD) && (NetBSD > 199609) && (NetBSD <= 1991011)) || \
(defined(NetBSD1_2) && NetBSD1_2 > 1) || \
(defined(__FreeBSD__) && (__FreeBSD_version >= 500043))
-# if (NetBSD >= 199905)
+# if defined(NetBSD) && (NetBSD >= 199905)
# define PFIL_HOOKS
# endif
# ifdef PFIL_HOOKS
@@ -1180,9 +1178,11 @@ extern void ipfilter_sgi_intfsync __P((void));
# ifdef IPFILTER_LKM
extern int iplidentify __P((char *));
# endif
-# if (_BSDI_VERSION >= 199510) || (__FreeBSD_version >= 220000) || \
+# if (defined(_BSDI_VERSION) && _BSDI_VERSION >= 199510) || \
+ (__FreeBSD_version >= 220000) || \
(NetBSD >= 199511) || defined(__OpenBSD__)
-# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \
+# if defined(__NetBSD__) || \
+ (defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701) || \
defined(__OpenBSD__) || (__FreeBSD_version >= 300000)
# if (__FreeBSD_version >= 500024)
# if (__FreeBSD_version >= 502116)
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c
index c42ce0a..e42469d 100644
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ b/sys/contrib/ipfilter/netinet/ip_log.c
@@ -62,7 +62,9 @@ struct file;
# 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) || \
+ (__FreeBSD_version >= 300000)
# include <sys/dirent.h>
# else
# include <sys/dir.h>
OpenPOWER on IntegriCloud