Skip to content

Commit

Permalink
dev-debug/scap-driver: fix test code for HAS_CLASS_CREATE_1
Browse files Browse the repository at this point in the history
otherwise test will failed because of -Werror=unused-variable, then
build will failed w/ kernel 6.4+ because of incorrect parameter of class_create

patch has been submited to upstream, see
falcosecurity/libs#2058

Signed-off-by: Z. Liu <[email protected]>
  • Loading branch information
clan committed Sep 12, 2024
1 parent 8c02192 commit 648c59b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev-debug/scap-driver/files/0.17.3-fix-kmod-build-on-6.4+.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/driver/configure/CLASS_CREATE_1/test.c b/driver/configure/CLASS_CREATE_1/test.c
index 675113b..72c5406 100644
--- a/driver/configure/CLASS_CREATE_1/test.c
+++ b/driver/configure/CLASS_CREATE_1/test.c
@@ -21,6 +21,7 @@ MODULE_AUTHOR("the Falco authors");
static int class_create_test_init(void)
{
struct class *g_ppm_class = class_create("test");
+ (void)g_ppm_class;
return 0;
}

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
# This version can be found in the corresponding *sysdig* tree in cmake/modules/driver.cmake
DRIVER_VERSION="7.2.0+driver"

PATCHES=(
"${FILESDIR}"/${PV}-fix-kmod-build-on-6.4+.patch
)

src_configure() {
local mycmakeargs=(
# we will use linux-mod, so just pretend to use bundled deps
Expand Down

0 comments on commit 648c59b

Please sign in to comment.