summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/compat/compat-asm.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-01-13 18:36:37 +0100
committerMichael Bestas <mkbestas@lineageos.org>2021-07-23 02:43:41 +0300
commited42fb473378e0ea1ae2cc131dbed1274393edb8 (patch)
treed63c778e90d8582204acaffecbba91b8ba69a0bc /drivers/net/wireguard/compat/compat-asm.h
parentb272a09a9bb09d10e914f63188e37165d95ff043 (diff)
compat: SYM_FUNC_* was backported to c8s
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Change-Id: I3bfa3b8eacc6d880e87749e705f3f96096ff9f37
Diffstat (limited to 'drivers/net/wireguard/compat/compat-asm.h')
-rw-r--r--drivers/net/wireguard/compat/compat-asm.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireguard/compat/compat-asm.h b/drivers/net/wireguard/compat/compat-asm.h
index 4e427e50e9c6..7067afd9b5e1 100644
--- a/drivers/net/wireguard/compat/compat-asm.h
+++ b/drivers/net/wireguard/compat/compat-asm.h
@@ -10,6 +10,17 @@
#include <linux/kconfig.h>
#include <linux/version.h>
+#ifdef RHEL_MAJOR
+#if RHEL_MAJOR == 7
+#define ISRHEL7
+#elif RHEL_MAJOR == 8
+#define ISRHEL8
+#if RHEL_MINOR == 4
+#define ISCENTOS8S
+#endif
+#endif
+#endif
+
/* PaX compatibility */
#if defined(RAP_PLUGIN)
#undef ENTRY
@@ -40,7 +51,7 @@
#undef pull
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 76)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 76) && !defined(ISCENTOS8S)
#define SYM_FUNC_START ENTRY
#define SYM_FUNC_END ENDPROC
#endif