diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-07-12 12:01:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 12:01:23 +0000 |
commit | bc41da4eb9c0f4a01633006b128a05d4469ec935 (patch) | |
tree | c9c13970b1f13b33f4e13066b022f6b2eb390ef5 /pkgs/os-specific | |
parent | 822f9981e2cd2be8c561a57d4c03dd729c051b31 (diff) | |
parent | 3a671cd64d03f4e55eb6c817d6294910e0ccc133 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kvmfr/default.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kvmfr/linux-6-4-compat.patch | 16 |
2 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kvmfr/default.nix b/pkgs/os-specific/linux/kvmfr/default.nix index 6b5f31a1d350b..67d4d8af2eb80 100644 --- a/pkgs/os-specific/linux/kvmfr/default.nix +++ b/pkgs/os-specific/linux/kvmfr/default.nix @@ -1,11 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, kernel, kmod, looking-glass-client }: +{ lib, stdenv, kernel, looking-glass-client }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "kvmfr"; version = looking-glass-client.version; src = looking-glass-client.src; sourceRoot = "source/module"; + patches = lib.optional (kernel.kernelAtLeast "6.4") [ + ./linux-6-4-compat.patch + ]; hardeningDisable = [ "pic" "format" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/kvmfr/linux-6-4-compat.patch b/pkgs/os-specific/linux/kvmfr/linux-6-4-compat.patch new file mode 100644 index 0000000000000..e57d1d27c36cd --- /dev/null +++ b/pkgs/os-specific/linux/kvmfr/linux-6-4-compat.patch @@ -0,0 +1,16 @@ +diff --git a/kvmfr.c b/kvmfr.c +index 121aae5b..2f4c9e1a 100644 +--- a/kvmfr.c ++++ b/kvmfr.c +@@ -539,7 +539,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; + |