about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch b/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch
new file mode 100644
index 000000000000..baf162e88d09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch
@@ -0,0 +1,22 @@
+diff --git a/Configure b/Configure
+index f0ad787bc4..a48d2008c6 100755
+--- a/Configure
++++ b/Configure
+@@ -1688,17 +1688,6 @@ unless ($disabled{devcryptoeng}) {
+ unless ($disabled{ktls}) {
+     $config{ktls}="";
+     if ($target =~ m/^linux/) {
+-        my $usr = "/usr/$config{cross_compile_prefix}";
+-        chop($usr);
+-        if ($config{cross_compile_prefix} eq "") {
+-            $usr = "/usr";
+-        }
+-        my $minver = (4 << 16) + (13 << 8) + 0;
+-        my @verstr = split(" ",`cat $usr/include/linux/version.h | grep LINUX_VERSION_CODE`);
+-
+-        if ($verstr[2] < $minver) {
+-            disable('too-old-kernel', 'ktls');
+-        }
+     } elsif ($target =~ m/^BSD/) {
+         my $cc = $config{CROSS_COMPILE}.$config{CC};
+         system("printf '#include <sys/types.h>\n#include <sys/ktls.h>' | $cc -E - >/dev/null 2>&1");