From owner-dev-commits-src-all@freebsd.org Tue Feb 9 00:36:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AA3254761A; Tue, 9 Feb 2021 00:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZP966sHzz3PlZ; Tue, 9 Feb 2021 00:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEDA1212A6; Tue, 9 Feb 2021 00:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1190awuE087119; Tue, 9 Feb 2021 00:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1190awOp087118; Tue, 9 Feb 2021 00:36:58 GMT (envelope-from git) Date: Tue, 9 Feb 2021 00:36:58 GMT Message-Id: <202102090036.1190awOp087118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 57785538c6e0 - main - Simplify the FreeBSD check using __FreeBSD__ compiler macro. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57785538c6e0d7e8ca0f161ab95bae10fd304047 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2021 00:36:59 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=57785538c6e0d7e8ca0f161ab95bae10fd304047 commit 57785538c6e0d7e8ca0f161ab95bae10fd304047 Author: Cy Schubert AuthorDate: 2021-02-07 03:22:52 +0000 Commit: Cy Schubert CommitDate: 2021-02-09 00:36:27 +0000 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 --- contrib/ipfilter/ip_dstlist.c | 2 +- contrib/ipfilter/ip_fil_compat.c | 2 +- contrib/ipfilter/ipf.h | 2 +- contrib/ipfilter/ipsend/sbpf.c | 2 +- contrib/ipfilter/ipsend/sock.c | 2 +- sys/contrib/ipfilter/netinet/fil.c | 6 +++--- sys/contrib/ipfilter/netinet/ip_auth.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_compat.h | 6 +++--- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 8 ++++---- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 6 +++--- sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_htable.c | 2 +- sys/contrib/ipfilter/netinet/ip_log.c | 12 ++++++------ sys/contrib/ipfilter/netinet/ip_lookup.c | 2 +- sys/contrib/ipfilter/netinet/ip_nat.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_nat6.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_rules.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_sync.c | 6 +++--- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 18 +++++++++--------- 23 files changed, 64 insertions(+), 64 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 # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #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 #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #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 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 #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #else # include 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", diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 2dca1e754b9e..09b4c27a1cb4 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -20,7 +20,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # if !defined(IPFILTER_LKM) # include "opt_inet6.h" # endif @@ -91,7 +91,7 @@ #if defined(IPFILTER_BPF) && defined(_KERNEL) # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include "netinet/ipl.h" @@ -2886,7 +2886,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD__) /* * disable delayed checksums. */ diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index c40bb1b435f2..881dab1aaea8 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -27,7 +27,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -50,7 +50,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__NetBSD__) @@ -81,7 +81,7 @@ # undef KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # define IF_QFULL _IF_QFULL # define IF_DROP _IF_DROP @@ -100,7 +100,7 @@ # include # endif #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 3de517b4559d..5c00f8d37e40 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -101,7 +101,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD__) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) @@ -282,7 +282,7 @@ typedef union { #define ipf_isw ipf_lkun_s.ipf_sw #define ipf_magic ipf_lkun_s.ipf_magic -#if !defined(__GNUC__) || defined(__FreeBSD_version) +#if !defined(__GNUC__) || defined(__FreeBSD__) # ifndef INLINE # define INLINE # endif @@ -290,7 +290,7 @@ typedef union { # define INLINE __inline__ #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) CTASSERT(sizeof(ipfrwlock_t) == KRWLOCK_FILL_SZ); CTASSERT(sizeof(ipfmutex_t) == KMUTEX_FILL_SZ); #endif diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 11e1a1846d89..af584d8e4d72 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 72def439b3e8..8cb988e1fd17 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -1374,7 +1374,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD__) # define CDEV_MAJOR 79 #endif @@ -1567,7 +1567,7 @@ typedef struct ipf_main_softc_s { frentry_t *ipf_rule_explist[2]; ipftoken_t *ipf_token_head; ipftoken_t **ipf_token_tail; -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) struct callout ipf_slow_ch; #endif #if NETBSD_GE_REV(104040000) @@ -1641,14 +1641,14 @@ extern size_t mbufchainlen(mb_t *); # ifdef IPFILTER_LKM extern int ipf_identify(char *); # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif # endif /* SOLARIS */ -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipf_pfil_hook(void); extern int ipf_pfil_unhook(void); extern void ipf_event_reg(void); diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 39fe0933f417..9f03ab3bf946 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -16,11 +16,11 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && \ +#if defined(__FreeBSD__) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && \ +#if defined(__FreeBSD__) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_random_ip_id.h" #endif @@ -35,7 +35,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 0636f27c81e8..93bcc2ed9415 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -24,7 +24,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/sys/contrib/ipfilter/netinet/ip_htable.c index bd76c2b5b0be..bd1a7136086f 100644 --- a/sys/contrib/ipfilter/netinet/ip_htable.c +++ b/sys/contrib/ipfilter/netinet/ip_htable.c @@ -24,7 +24,7 @@ # undef _KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__FreeBSD__) diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index d7acaf1ebf4e..7a80b3e0d4e7 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -39,7 +39,7 @@ # undef _KERNEL # undef KERNEL #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else @@ -52,12 +52,12 @@ # include # endif #endif /* _KERNEL */ -# if defined(NetBSD) || defined(__FreeBSD_version) +# if defined(NetBSD) || defined(__FreeBSD__) # include # include # include # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) # include # endif #if SOLARIS && defined(_KERNEL) @@ -78,7 +78,7 @@ #ifdef sun # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include @@ -102,7 +102,7 @@ #include "netinet/ip_frag.h" #include "netinet/ip_state.h" #include "netinet/ip_auth.h" -#if defined(__FreeBSD_version) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif /* END OF INCLUDES */ @@ -443,7 +443,7 @@ ipf_log_pkt(fin, flags) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else # if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \ - defined(__FreeBSD_version) + defined(__FreeBSD__) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else ipfl.fl_unit = (u_int)ifp->if_unit; diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.c b/sys/contrib/ipfilter/netinet/ip_lookup.c index f25174a752ec..66dec84944a1 100644 --- a/sys/contrib/ipfilter/netinet/ip_lookup.c +++ b/sys/contrib/ipfilter/netinet/ip_lookup.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 17c1133e145d..33d190c61a0a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -31,7 +31,7 @@ struct file; # include # undef KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -55,11 +55,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -90,7 +90,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H @@ -1017,7 +1017,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) KAUTH_REQ_NETWORK_FIREWALL_FW, NULL, NULL, NULL)) # else -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) if (securelevel_ge(curthread->td_ucred, 3) && (mode & FWRITE)) # else if ((securelevel >= 3) && (mode & FWRITE)) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 13fa6fb6bc30..921eefc0ea3f 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -29,7 +29,7 @@ struct file; # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -53,11 +53,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -88,7 +88,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index 51d810baa310..fdd83ebd977f 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -38,7 +38,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 2c6b4eb6369d..b4773bb6f358 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -29,7 +29,7 @@ # include #include #if defined(_KERNEL) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # endif # include @@ -37,7 +37,7 @@ # include # endif #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -51,11 +51,11 @@ # include # include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #endif #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) #include #else #define CURVNET_SET(arg) @@ -80,7 +80,7 @@ #include "netinet/ip_nat.h" #include "netinet/ip_state.h" #include "netinet/ip_proxy.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_rules.c b/sys/contrib/ipfilter/netinet/ip_rules.c index 2fb61e9d91bf..fcf6923adeb3 100644 --- a/sys/contrib/ipfilter/netinet/ip_rules.c +++ b/sys/contrib/ipfilter/netinet/ip_rules.c @@ -12,7 +12,7 @@ #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # if defined(_KERNEL) # include # else diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index a050a2d324d2..0ebebb49297d 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -19,7 +19,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) && \ +#if defined(_KERNEL) && defined(__FreeBSD__) && \ !defined(KLD_MODULE) #include "opt_inet6.h" #endif @@ -31,7 +31,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max) /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; diff --git a/sys/contrib/ipfilter/netinet/ip_sync.c b/sys/contrib/ipfilter/netinet/ip_sync.c index f95cd824544b..66bf88e877f0 100644 --- a/sys/contrib/ipfilter/netinet/ip_sync.c +++ b/sys/contrib/ipfilter/netinet/ip_sync.c @@ -30,14 +30,14 @@ # include # endif # include -# ifdef __FreeBSD_version +# ifdef __FreeBSD__ # include # endif #endif #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) # include #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -79,7 +79,7 @@ #ifdef USE_INET6 #include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 1f4daf28824d..6e49ef77b486 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -22,7 +22,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # include # ifdef _KERNEL @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,7 +68,7 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static int ipfopen(struct cdev*, int, int, struct thread *); static int ipfclose(struct cdev*, int, int, struct thread *); static int ipfread(struct cdev*, struct uio *, int); @@ -135,7 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ip #define CDEV_MAJOR 79 #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); @@ -417,7 +417,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -470,7 +470,7 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -510,7 +510,7 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -538,7 +538,7 @@ static int ipfclose(dev, flags */ static int ipfread(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; @@ -581,7 +581,7 @@ static int ipfread(dev, uio, ioflag) */ static int ipfwrite(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev;