unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 49c1a713a52eff62d31c110d6cec3eeff98d743b 1056 bytes (raw)
name: gnu/packages/patches/kvmfr-linux-module-fix-build.patch 	 # note: path name is non-authoritative(*)

 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
34
35
36
37
38
39
40
41
 
Copied from
https://github.com/gnif/LookingGlass/issues/1075#issuecomment-1546422678 and
https://github.com/gnif/LookingGlass/issues/1134 with adjustments for current
kvmfr source version.

From c4950a830fbe2ca27337793aa227c86f5c044f46 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 5 Oct 2024 16:11:45 +0300
Subject: [PATCH] Fix build

---
 module/kvmfr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/module/kvmfr.c b/module/kvmfr.c
index 121aae5..4c386f9 100644
--- a/module/kvmfr.c
+++ b/module/kvmfr.c
@@ -30,6 +30,7 @@
 #include <linux/highmem.h>
 #include <linux/memremap.h>
 #include <linux/version.h>
+#include <linux/vmalloc.h>
 
 #include <asm/io.h>
 
@@ -539,7 +540,11 @@ static int __init kvmfr_module_init(void)
   if (kvmfr->major < 0)
     goto out_free;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
   kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
+#else
+  kvmfr->pClass = class_create(KVMFR_DEV_NAME);
+#endif
   if (IS_ERR(kvmfr->pClass))
     goto out_unreg;
 
-- 
2.41.0


debug log:

solving 49c1a713a5 ...
found 49c1a713a5 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).