aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-02-07 03:22:52 +0000
committerCy Schubert <cy@FreeBSD.org>2021-02-09 00:36:27 +0000
commit57785538c6e0d7e8ca0f161ab95bae10fd304047 (patch)
tree9410005f7c903f5c4d2ffca0a94b31cac3fa3a4c /contrib
parentd20f7a5a3da1aa5bccdabb89c181ca0c49385ecd (diff)
downloadsrc-57785538c6e0d7e8ca0f161ab95bae10fd304047.tar.gz
src-57785538c6e0d7e8ca0f161ab95bae10fd304047.zip
Simplify the FreeBSD check using __FreeBSD__ compiler macro.
Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ipfilter/ip_dstlist.c2
-rw-r--r--contrib/ipfilter/ip_fil_compat.c2
-rw-r--r--contrib/ipfilter/ipf.h2
-rw-r--r--contrib/ipfilter/ipsend/sbpf.c2
-rw-r--r--contrib/ipfilter/ipsend/sock.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c
index 14b071b0b95f..2802ef694aa9 100644
--- a/contrib/ipfilter/ip_dstlist.c
+++ b/contrib/ipfilter/ip_dstlist.c
@@ -41,7 +41,7 @@
# include <sys/stream.h>
# include <sys/kmem.h>
#endif
-#if defined(__FreeBSD_version)
+#if defined(__FreeBSD__)
# include <sys/malloc.h>
#endif
diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c
index 6184502e0f58..0b426f5d9c48 100644
--- a/contrib/ipfilter/ip_fil_compat.c
+++ b/contrib/ipfilter/ip_fil_compat.c
@@ -14,7 +14,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/file.h>
-#if defined(__FreeBSD_version) && defined(_KERNEL)
+#if defined(__FreeBSD__) && defined(_KERNEL)
# include <sys/fcntl.h>
# include <sys/filio.h>
#else
diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h
index c7f7308a9ba9..e178cfc1676e 100644
--- a/contrib/ipfilter/ipf.h
+++ b/contrib/ipfilter/ipf.h
@@ -172,7 +172,7 @@ typedef struct proxyrule {
} proxyrule_t;
-#if defined(__NetBSD__) || defined(__FreeBSD_version) || \
+#if defined(__NetBSD__) || defined(__FreeBSD__) || \
SOLARIS
# include <stdarg.h>
typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...);
diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c
index 9b4f20c3fea9..f3b8d2f37775 100644
--- a/contrib/ipfilter/ipsend/sbpf.c
+++ b/contrib/ipfilter/ipsend/sbpf.c
@@ -12,7 +12,7 @@
#include <sys/socket.h>
#include <sys/file.h>
#include <sys/ioctl.h>
-#ifdef __FreeBSD_version
+#ifdef __FreeBSD__
# include <sys/dirent.h>
#else
# include <sys/dir.h>
diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c
index ddb59eb029f8..7754ef9d8e1c 100644
--- a/contrib/ipfilter/ipsend/sock.c
+++ b/contrib/ipfilter/ipsend/sock.c
@@ -168,7 +168,7 @@ struct tcpcb *find_tcp(tfd, ti)
fd = (struct filedesc *)malloc(sizeof(*fd));
if (fd == NULL)
return NULL;
-#if defined( __FreeBSD_version)
+#if defined( __FreeBSD__)
if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1)
{
fprintf(stderr, "read(%#lx,%#lx) failed\n",