diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-05-02 00:56:42 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-05-03 20:08:55 -0600 |
commit | 1990cff56992c0984ae5d73989ba10aa26eae608 (patch) | |
tree | c199b64a3820346b4b8da777faa628a7e7cc4339 | |
parent | 5022a7e3f8aad07f1e2b543827830f1f18ca318d (diff) |
compat: detect Debian's backport of ip6_dst_lookup_flow into 4.19.118
Link: https://bugs.debian.org/959157
Reported-by: Luca Filipozzi <lfilipoz@debian.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/compat/Kbuild.include | 4 | ||||
-rw-r--r-- | src/compat/compat.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include index addc7c6..db20bd5 100644 --- a/src/compat/Kbuild.include +++ b/src/compat/Kbuild.include @@ -100,3 +100,7 @@ ifeq ($(CONFIG_X86_64),y) asflags-y += $(adx_instr) endif endif + +ifneq ($(shell grep -s -F "\#define LINUX_PACKAGE_ID \" Debian " "$(CURDIR)/include/generated/package.h"),) +ccflags-y += -DISDEBIAN +endif diff --git a/src/compat/compat.h b/src/compat/compat.h index caff80f..f90bcfa 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -98,7 +98,7 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 83) #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup_flow(b, c, d) -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && !defined(ISRHEL82)) +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) || (((!defined(ISDEBIAN) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 118)) && !defined(ISRHEL82)) #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst #endif |