aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-02-03 03:18:48 +0000
committerCy Schubert <cy@FreeBSD.org>2021-02-06 02:39:38 +0000
commite673debe7db8ba95e4ee3b549d2570e71d19b596 (patch)
tree68f291b7940bde3fc016b57fd8429480b1f52d8c /sys
parent8b804ee616b4c8810015b69e37e31ef0c4161511 (diff)
downloadsrc-e673debe7db8ba95e4ee3b549d2570e71d19b596.tar.gz
src-e673debe7db8ba95e4ee3b549d2570e71d19b596.zip
Simplify BSD macro tests.
All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_compat.h4
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil_freebsd.c4
-rw-r--r--sys/contrib/ipfilter/netinet/ip_log.c2
-rw-r--r--sys/contrib/ipfilter/netinet/mlfk_ipl.c8
4 files changed, 3 insertions, 15 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h
index 490e939f7f37..3de517b4559d 100644
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ b/sys/contrib/ipfilter/netinet/ip_compat.h
@@ -424,12 +424,12 @@ extern mb_t *allocmbt(size_t);
# define USE_QUAD_T
# define U_QUAD_T unsigned long long
# define QUAD_T long long
-#else /* BSD > 199306 */
+#else /* BSD */
# if !defined(U_QUAD_T)
# define U_QUAD_T u_long
# define QUAD_T long
# endif
-#endif /* BSD > 199306 */
+#endif /* BSD */
#ifdef USE_INET6
diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
index 338c4e24c03a..39fe0933f417 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
@@ -288,14 +288,12 @@ ipfioctl(dev, cmd, data, mode, p)
SPL_INT(s);
CURVNET_SET(TD_TO_VNET(p));
-#if (BSD >= 199306)
if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE))
{
V_ipfmain.ipf_interror = 130001;
CURVNET_RESTORE();
return EPERM;
}
-#endif
unit = GET_MINOR(dev);
if ((IPL_LOGMAX < unit) || (unit < 0)) {
@@ -382,11 +380,9 @@ ipf_send_reset(fin)
}
m->m_len = sizeof(*tcp2) + hlen;
-#if (BSD >= 199103)
m->m_data += max_linkhdr;
m->m_pkthdr.len = m->m_len;
m->m_pkthdr.rcvif = (struct ifnet *)0;
-#endif
ip = mtod(m, struct ip *);
bzero((char *)ip, hlen);
#ifdef USE_INET6
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c
index e5bf6a78bf1b..d7acaf1ebf4e 100644
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ b/sys/contrib/ipfilter/netinet/ip_log.c
@@ -734,7 +734,7 @@ ipf_log_read(softc, unit, uio)
return EIO;
}
-# if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__)
+# if defined(BSD)
uio->uio_rw = UIO_READ;
# endif
diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
index 0b9fdb76263e..1f4daf28824d 100644
--- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c
+++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
@@ -536,12 +536,8 @@ static int ipfclose(dev, flags
* called during packet processing and cause an inconsistancy to appear in
* the filter lists.
*/
-#if (BSD >= 199306)
static int ipfread(dev, uio, ioflag)
int ioflag;
-#else
-static int ipfread(dev, uio)
-#endif
#ifdef __FreeBSD_version
struct cdev *dev;
#else
@@ -583,12 +579,8 @@ static int ipfread(dev, uio)
* called during packet processing and cause an inconsistancy to appear in
* the filter lists.
*/
-#if (BSD >= 199306)
static int ipfwrite(dev, uio, ioflag)
int ioflag;
-#else
-static int ipfwrite(dev, uio)
-#endif
#ifdef __FreeBSD_version
struct cdev *dev;
#else