summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ax99100
diff options
context:
space:
mode:
authorMarkus Partheymüller <markus.partheymueller@cyberus-technology.de>2023-07-05 10:58:25 +0200
committerMarkus Partheymüller <markus.partheymueller@cyberus-technology.de>2023-07-05 11:03:50 +0200
commit79719555e2911ce44760c3c19d97bb9f8d972cc9 (patch)
tree83c23d45f49f5465d27ad2840be3a150e42522ad /pkgs/os-specific/linux/ax99100
parent9336e11d5ea8d55e7c486fbcc3686d2ddb3e576b (diff)
downloadnixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar.gz
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar.bz2
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar.lz
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar.xz
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.tar.zst
nixpkgs-79719555e2911ce44760c3c19d97bb9f8d972cc9.zip
linuxPackages.ax99100: Fix build with Linux 6.4
Diffstat (limited to 'pkgs/os-specific/linux/ax99100')
-rw-r--r--pkgs/os-specific/linux/ax99100/default.nix1
-rw-r--r--pkgs/os-specific/linux/ax99100/kernel-6.4-fix-define-semaphore.patch14
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/ax99100/default.nix b/pkgs/os-specific/linux/ax99100/default.nix
index 91999c0113c..761800cfd7b 100644
--- a/pkgs/os-specific/linux/ax99100/default.nix
+++ b/pkgs/os-specific/linux/ax99100/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation {
     ./kernel-6.1-set_termios-const-ktermios.patch
   ] ++ lib.optionals (lib.versionAtLeast kernel.version "6.2") [
     ./kernel-6.2-fix-pointer-type.patch
+    ./kernel-6.4-fix-define-semaphore.patch
   ];
 
   patchFlags = [ "-p0" ];
diff --git a/pkgs/os-specific/linux/ax99100/kernel-6.4-fix-define-semaphore.patch b/pkgs/os-specific/linux/ax99100/kernel-6.4-fix-define-semaphore.patch
new file mode 100644
index 00000000000..434bb559e17
--- /dev/null
+++ b/pkgs/os-specific/linux/ax99100/kernel-6.4-fix-define-semaphore.patch
@@ -0,0 +1,14 @@
+--- ax99100_sp.c
++++ ax99100_sp.c
+@@ -2670,8 +2670,10 @@ static void serial99100_dma_tx_tasklet (unsigned long param)
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+ static DECLARE_MUTEX(serial99100_sem);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
+ static DEFINE_SEMAPHORE(serial99100_sem);
++#else
++static DEFINE_SEMAPHORE(serial99100_sem, 1);
+ #endif
+ 
+ static struct uart_driver starex_serial_driver = {