mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 04:25:14 +00:00
sysdig: Include driver patch to fix compilation on Linux 6.2
On nixos-unstable with the latest kernel (6.2.0), I'm seeing sysdig fail to compile: /build/source/build/driver/src/main.c:2788:30: error: assignment to 'char * (*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device *, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *)' {aka 'char * (*)(struct device *, short unsigned int *)'} [-Werror=incompatible-pointer-types] 2788 | g_ppm_class->devnode = ppm_devnode; | ^ /build/libs/userspace/libscap/scap_procs.c: In function 'scap_os_getpid_global': This has already been fixed upstream, this just cherry-picks that fix.
This commit is contained in:
parent
988cc958c5
commit
bb724fa986
@ -22,6 +22,11 @@ let
|
||||
rev = "3.0.1+driver";
|
||||
sha256 = "sha256-bK9wv17bVl93rOqw7JICnMOM0fDtPIErfMmUmNKOD5c=";
|
||||
};
|
||||
# Workaround for scap-driver compilation error on kernel 6.2: https://github.com/falcosecurity/libs/issues/918
|
||||
driverPatch = fetchpatch {
|
||||
url = "https://github.com/falcosecurity/libs/commit/b8ec3e8637c850066d01543616fe413e8deb9e1f.patch";
|
||||
hash = "sha256-s7iHbOjVqHSWRY4gktZldgrU5OClqRmbqmDtUgFIeh0=";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
@ -67,6 +72,7 @@ stdenv.mkDerivation rec {
|
||||
chmod -R +w libs
|
||||
cp -r ${driver} driver-src
|
||||
chmod -R +w driver-src
|
||||
patch -p1 -d driver-src < ${driverPatch}
|
||||
cmakeFlagsArray+=(
|
||||
"-DFALCOSECURITY_LIBS_SOURCE_DIR=$(pwd)/libs"
|
||||
"-DVALIJSON_INCLUDE=${valijson}/include"
|
||||
|
Loading…
Reference in New Issue
Block a user