summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel-headers
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-15 23:32:54 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-06-15 23:34:12 +0100
commit912eb001da85949daa4371729c1e75b56be1fff3 (patch)
tree1417d646ee7415fa2c88095e11af968e8776c763 /pkgs/os-specific/linux/kernel-headers
parent5917794eda56c442f8e12f54ec271877cbaf1caf (diff)
downloadnixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar.gz
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar.bz2
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar.lz
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar.xz
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.tar.zst
nixpkgs-912eb001da85949daa4371729c1e75b56be1fff3.zip
linuxHeaders: backport fix to restore __bitwise__ define
Without it openiscsi build fails in staging-next as:

    ../../include/iscsi_proto.h:550:9: error: unknown type name 'itt_t'
       550 |         itt_t    itt;   /* Initiator Task Tag */
           |         ^~~~~
Diffstat (limited to 'pkgs/os-specific/linux/kernel-headers')
-rw-r--r--pkgs/os-specific/linux/kernel-headers/default.nix3
-rw-r--r--pkgs/os-specific/linux/kernel-headers/restore-__bitwise__.patch15
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix
index d07c9073e6a..5b2fb62cb95 100644
--- a/pkgs/os-specific/linux/kernel-headers/default.nix
+++ b/pkgs/os-specific/linux/kernel-headers/default.nix
@@ -93,6 +93,9 @@ in {
       };
       patches = [
          ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
+
+         # 5.19 backport. Can be removed on update.
+         ./restore-__bitwise__.patch
       ];
     };
 }
diff --git a/pkgs/os-specific/linux/kernel-headers/restore-__bitwise__.patch b/pkgs/os-specific/linux/kernel-headers/restore-__bitwise__.patch
new file mode 100644
index 00000000000..67d2af8fc3b
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel-headers/restore-__bitwise__.patch
@@ -0,0 +1,15 @@
+https://github.com/torvalds/linux/commit/caa28984163cb63ea0be4cb8dbf05defdc7303f9
+
+Fixes openiscsi build.
+--- a/include/uapi/linux/types.h
++++ b/include/uapi/linux/types.h
+@@ -26,6 +26,9 @@
+ #define __bitwise
+ #endif
+ 
++/* The kernel doesn't use this legacy form, but user space does */
++#define __bitwise__ __bitwise
++
+ typedef __u16 __bitwise __le16;
+ typedef __u16 __bitwise __be16;
+ typedef __u32 __bitwise __le32;