From 9e6a52a79c36221feeb64f5dd04b607d58680360 Mon Sep 17 00:00:00 2001 From: Gary Stanley Date: Sat, 28 Oct 2023 06:47:16 +0000 Subject: [PATCH] Fix build failures on newer linux kernels --- .github/workflows/ci.yml | 1 + knetstat.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3dfc3c..402ebe3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - 5.4.104 - 5.10.22 - 5.11.6 + - 5.14 name: "Linux ${{ matrix.kernel }}" runs-on: ubuntu-22.04 steps: diff --git a/knetstat.c b/knetstat.c index eef10cc..8b1c93c 100644 --- a/knetstat.c +++ b/knetstat.c @@ -31,6 +31,10 @@ #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) +#define PDE_DATA(i) pde_data(i) +#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) #define tcp_time_stamp tcp_time_stamp_raw() #endif