diff options
author | Ilie Halip <ilie.halip@gmail.com> | 2020-01-23 13:18:25 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-01-30 14:52:45 +0100 |
commit | 003fb6ee9502741f41cb2563d2916172d98f5fd1 (patch) | |
tree | e823965f8f1f8cf28fedafb47faae99a3fa1f297 /src/compat/compat.h | |
parent | 5fd36918d725cfae191e571fb4e013c4075862b6 (diff) |
compat: support building for RHEL-8.2
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>
[zx2c4: we normally only support the latest RHEL, but having some beta
support for the time being sounds like a good plan, given that there
may be interest from RedHat in actually merging this into their
kernels.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 3bd19cb..57d6568 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 @@ -787,7 +792,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 @@ -796,7 +801,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. */ @@ -838,7 +843,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 |