mirror of https://github.com/sipwise/rtpengine.git
The current LINUX_VERSION_CODE check for the nft_expr_ops.validate callback signature breaks on distribution kernels that backport the API change (mainline commit eaf9b2c875ec, merged in 6.12) without updating LINUX_VERSION_CODE. For example, Ubuntu 24.04's 6.8.0-103+ kernel (stable patchset 2026-01-27, LP: #2139158) includes this backport, causing DKMS builds to fail with -Werror=incompatible-pointer-types. Replace the version-based #if with a compile test in the existing gen-rtpengine-kmod-flags configure script. The test tries to assign a 3-param function to .validate -- if it compiles, the old API is present and NFT_EXPR_OPS_VALIDATE_HAS_DATA is set. If it fails, the kernel has the new 2-param version. Also use kbuild's KERNELRELEASE variable (instead of uname -r) to resolve the kernel build directory, so that compile tests and KSRC target the correct kernel during cross-version DKMS builds. Tested against Ubuntu 6.8.0-90 (3-param) and 6.8.0-106 (2-param), including cross-kernel builds where the running kernel differs from the DKMS target. Closes #2085 Change-Id: I4c8e55b94fb98c3fcda9dccb091d0d1c0c67f9aapull/2090/head
parent
7e6c2c30a4
commit
b1aec46de8
Loading…
Reference in new issue