summaryrefslogtreecommitdiff
blob: ac0a4aeca285dff4e4ae9e00f4b93f493dc526ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: https://github.com/falcosecurity/libs/pull/1110
Bug: https://github.com/falcosecurity/libs/issues/1109

From 394c9d84e64ad9828cdce6cdad5a76c352e252d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Fri, 19 May 2023 03:54:40 +0200
Subject: [PATCH] fix(driver): fixed 6.4 kernel build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
---
 driver/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/driver/main.c b/driver/main.c
index 380f85c27c..668e45429a 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -2912,7 +2912,11 @@ int scap_init(void)
 		goto init_module_err;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
 	g_ppm_class = class_create(THIS_MODULE, DRIVER_DEVICE_NAME);
+#else
+	g_ppm_class = class_create(DRIVER_DEVICE_NAME);
+#endif
 	if (IS_ERR(g_ppm_class)) {
 		pr_err("can't allocate device class\n");
 		ret = -EFAULT;