From 912eb001da85949daa4371729c1e75b56be1fff3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 15 Jun 2022 23:32:54 +0100 Subject: 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 */ | ^~~~~ --- pkgs/os-specific/linux/kernel-headers/default.nix | 3 +++ .../linux/kernel-headers/restore-__bitwise__.patch | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel-headers/restore-__bitwise__.patch (limited to 'pkgs/os-specific/linux') 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; -- cgit 1.4.1