mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
From 96da3ca01ac172e5d858209b3d3d9aefad04423c Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Sun, 13 Mar 2022 13:47:24 +0100
|
|
Subject: [PATCH 3/3] nss-crypto: fix SHA header include in 5.15
|
|
|
|
SHA header was split into SHA-1 and SHA-2 headers in kernel 5.11, so
|
|
fix the include for newer kernels.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
v2.0/src/nss_crypto_ctrl.c | 6 ++++++
|
|
v2.0/src/nss_crypto_hlos.h | 4 ++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
--- a/v2.0/src/nss_crypto_ctrl.c
|
|
+++ b/v2.0/src/nss_crypto_ctrl.c
|
|
@@ -38,7 +38,13 @@
|
|
#include <linux/debugfs.h>
|
|
#include <linux/log2.h>
|
|
#include <linux/completion.h>
|
|
+#include <linux/version.h>
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
|
#include <crypto/sha.h>
|
|
+#else
|
|
+#include <crypto/sha1.h>
|
|
+#include <crypto/sha2.h>
|
|
+#endif
|
|
#include <crypto/des.h>
|
|
#include <crypto/aes.h>
|
|
#include <crypto/md5.h>
|
|
--- a/v2.0/src/nss_crypto_hlos.h
|
|
+++ b/v2.0/src/nss_crypto_hlos.h
|
|
@@ -58,7 +58,11 @@
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
|
#include <linux/cryptohash.h>
|
|
#endif
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
|
#include <crypto/sha.h>
|
|
+#else
|
|
+#include <crypto/sha1.h>
|
|
+#endif
|
|
#include <crypto/aes.h>
|
|
#include <crypto/des.h>
|
|
#include <crypto/ghash.h>
|