From: Ilie Halip <ilie.halip@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: [PATCH] compat: support building for RHEL-8.2
Date: Thu, 23 Jan 2020 13:18:25 +0200 [thread overview]
Message-ID: <20200123111825.17435-1-ilie.halip@gmail.com> (raw)
RedHat backported some more changes, now released as kernel 4.18.0-168.el8.
To maintain compatibility with kernel -147, a new macro is introduced: ISRHEL82.
Compile-tested with the -168 and -147 kernels.
Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
---
src/compat/compat.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 96f3556..a77f973 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -16,6 +16,11 @@
#define ISRHEL7
#elif RHEL_MAJOR == 8
#define ISRHEL8
+#ifdef RHEL_MINOR
+#if RHEL_MINOR == 2
+#define ISRHEL82
+#endif
+#endif
#endif
#endif
#ifdef UTS_UBUNTU_RELEASE_ABI
@@ -783,7 +788,7 @@ struct __kernel_timespec {
#endif
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(ISRHEL82)
#include <linux/skbuff.h>
#define skb_probe_transport_header(a) skb_probe_transport_header(a, 0)
#endif
@@ -792,7 +797,7 @@ struct __kernel_timespec {
#define ignore_df local_df
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(ISRHEL82)
/* Note that all intentional uses of the non-_bh variety need to explicitly
* undef these, conditionalized on COMPAT_CANNOT_DEPRECIATE_BH_RCU.
*/
@@ -834,7 +839,7 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && !defined(ISRHEL8)
#define NLA_EXACT_LEN NLA_UNSPEC
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && !defined(ISRHEL82)
#define NLA_MIN_LEN NLA_UNSPEC
#define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY
#endif
--
2.17.1
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
next reply other threads:[~2020-01-28 10:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 11:18 Ilie Halip [this message]
2020-01-28 14:14 ` Jason A. Donenfeld
2020-01-30 13:54 ` Jason A. Donenfeld
2020-01-31 9:18 ` Ilie Halip
2020-02-01 19:10 ` Alex Davies
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123111825.17435-1-ilie.halip@gmail.com \
--to=ilie.halip@gmail.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).