From 1d1faeb638eed5f6fe6a1f4d20a9d42dafd5dc51 Mon Sep 17 00:00:00 2001 From: Naxdy Date: Fri, 20 Jun 2025 17:29:31 +0200 Subject: [PATCH] decklink: fix build for kernel 6.15 --- .../decklink/02-rename-timer-delete.patch | 26 +++++++++++++++++++ pkgs/os-specific/linux/decklink/default.nix | 21 +++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch diff --git a/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch b/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch new file mode 100644 index 000000000000..3535f8b9af09 --- /dev/null +++ b/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch @@ -0,0 +1,26 @@ +diff --git a/blackmagic-io-14.4.1a4/bm_util.c b/blackmagic-io-14.4.1a4/bm_util.c +index 66751cb..bf9723c 100644 +--- a/blackmagic-io-14.4.1a4/bm_util.c ++++ b/blackmagic-io-14.4.1a4/bm_util.c +@@ -471,10 +471,10 @@ void bm_timer_free(bm_timer_t* timer) + { + #if KERNEL_VERSION_OR_LATER(4, 15, 0) + struct bm_timer_wrapper* timer_wrapper = container_of(timer, struct bm_timer_wrapper, timer); +- del_timer(timer); ++ timer_delete(timer); + bm_kfree(timer_wrapper); + #else +- del_timer(timer); ++ timer_delete(timer); + bm_kfree(timer); + #endif + } +@@ -491,7 +491,7 @@ void bm_timer_expire_at(bm_timer_t* timer, uint64_t ns) + + void bm_timer_cancel(bm_timer_t* timer) + { +- del_timer_sync(timer); ++ timer_delete_sync(timer); + } + + // Event waiting diff --git a/pkgs/os-specific/linux/decklink/default.nix b/pkgs/os-specific/linux/decklink/default.nix index 3c2320b43a26..03f1b5cb61f8 100644 --- a/pkgs/os-specific/linux/decklink/default.nix +++ b/pkgs/os-specific/linux/decklink/default.nix @@ -13,14 +13,19 @@ stdenv.mkDerivation (finalAttrs: { # See pkgs/by-name/bl/blackmagic-desktop-video/package.nix for more. inherit (blackmagic-desktop-video) src version; - patches = lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.13") [ - # needed for version 14.4.x to build for kernel 6.13 - (fetchpatch { - name = "01-update-makefiles"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/01-update-makefiles.patch?h=decklink"; - hash = "sha256-l3iu0fG/QJMdGI/WSlNn+qjF4nK25JxoiwhPrMGTqE4="; - }) - ]; + patches = + (lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.13") [ + # needed for version 14.4.x to build for kernel 6.13 + (fetchpatch { + name = "01-update-makefiles"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/01-update-makefiles.patch?h=decklink"; + hash = "sha256-l3iu0fG/QJMdGI/WSlNn+qjF4nK25JxoiwhPrMGTqE4="; + }) + ]) + ++ (lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.15") [ + # needed for version 14.4.x to build for kernel 6.15 + ./02-rename-timer-delete.patch + ]); KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; INSTALL_MOD_PATH = placeholder "out";