From 76730f5ee988fe5a964c54c0293c6fe4de2bbb1b Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+weebdatahoarder@users.noreply.github.com> Date: Thu, 28 Oct 2021 23:51:41 +0200 Subject: [PATCH] Add compatibility for kernel 4.19.x where x >= 18, as they added skb_frag_off --- .drone.jsonnet | 4 +--- src/kcompat.h | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index f632a42..37ab7f8 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -33,8 +33,6 @@ local XbpsPipeline(image, version, arch, extra, buildKernel) = Pipeline(image, v [ AptPipeline("ubuntu", "20.04", "amd64", "linux-headers-generic", "ls --sort time /lib/modules/ | head -n 1"), AptPipeline("ubuntu", "20.04", "arm64", "linux-headers-generic", "ls --sort time /lib/modules/ | head -n 1"), - AptPipeline("ubuntu", "18.04", "amd64", "linux-headers-generic", "ls --sort time /lib/modules/ | head -n 1"), - AptPipeline("ubuntu", "16.04", "amd64", "linux-headers-generic", "ls --sort time /lib/modules/ | head -n 1"), AptPipeline("debian", "bullseye", "amd64", "linux-headers-amd64", "ls --sort time /lib/modules/ | head -n 1"), AptPipeline("debian", "bullseye", "arm64", "linux-headers-arm64", "ls --sort time /lib/modules/ | head -n 1"), @@ -48,7 +46,7 @@ local XbpsPipeline(image, version, arch, extra, buildKernel) = Pipeline(image, v YumPipeline("fedora", "latest", "amd64", "kernel-devel kernel-headers", "ls --sort time /usr/src/kernels/ | head -n 1"), YumPipeline("fedora", "latest", "arm64", "kernel-devel kernel-headers", "ls --sort time /usr/src/kernels/ | head -n 1"), - PacManPipeline("archlinux", "latest", "amd64", "linux-headers", "ls --sort time /lib/modules/ | head -n 1"), + PacManPipeline("archlinux", "latest", "amd64", "linux-headers libffi", "ls --sort time /lib/modules/ | head -n 1"), ApkPipeline("alpine", "latest", "amd64", "linux-headers linux-lts-dev", "ls -t /lib/modules/ | head -n 1"), ApkPipeline("alpine", "latest", "arm64", "linux-headers linux-lts-dev", "ls -t /lib/modules/ | head -n 1"), diff --git a/src/kcompat.h b/src/kcompat.h index 1f0023a..0f9b9d5 100644 --- a/src/kcompat.h +++ b/src/kcompat.h @@ -6096,7 +6096,9 @@ int _kc_flow_block_cb_setup_simple(struct flow_block_offload *f, #endif /* 5.3.0 */ /*****************************************************************************/ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)) +//This needs specific checks due to inclusion of skb_frag_off on a few kernel dot releases +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)) && \ +(LINUX_VERSION_CODE < KERNEL_VERSION(4,19,18) || LINUX_VERSION_CODE > KERNEL_VERSION(4,19,255)) static inline unsigned int skb_frag_off(const skb_frag_t *frag) { return frag->page_offset;