Skip to contentSkip to conversation

package/rtl8821cu: fix build failure with Linux 6.18

PATCH New Giulio Benetti 1 participant 1 message Dec 14, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rtl8821cu: fix build failure with Linux 6.18

Add pending upstreamed local patch.

---
 ..._sha256-conflict-with-linux-function.patch | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/rtl8821cu/0001-Fix-hmac_sha256-conflict-with-linux-function.patch
package/rtl8821cu/0001-Fix-hmac_sha256-conflict-with-linux-function.patch new file +43 -0
new file mode 100644
index 0000000000..6f96cb2bee
@@ -0,0 +1,43 @@
+From 85a4ce313531e0941a8a80f1b198f5fd5ceb9168 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Sun, 14 Dec 2025 22:05:45 +0100
+Subject: [PATCH] Fix hmac_sha256() conflict with linux function
+
+Prefix local hmac_sha256() with rtl_ resulting into rtl_hmac_sha256().
+
+Upstream: https://github.com/morrownr/8821cu-20210916/pull/195
+Signed-off-by: Giulio Benetti <[email protected]>
+---
+ core/crypto/sha256.c | 2 +-
+ core/crypto/sha256.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/crypto/sha256.c b/core/crypto/sha256.c
+index ea5d9e3..d0a18c7 100644
+--- a/core/crypto/sha256.c
++++ b/core/crypto/sha256.c
+@@ -97,7 +97,7 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
+  * @mac: Buffer for the hash (32 bytes)
+  * Returns: 0 on success, -1 on failure
+  */
+-int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
++int rtl_hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
+ 		size_t data_len, u8 *mac)
+ {
+ 	return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);
+diff --git a/core/crypto/sha256.h b/core/crypto/sha256.h
+index 5219022..6260146 100644
+--- a/core/crypto/sha256.h
++++ b/core/crypto/sha256.h
+@@ -13,7 +13,7 @@
+ 
+ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
+ 		       const u8 *addr[], const size_t *len, u8 *mac);
+-int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
++int rtl_hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
+ 		size_t data_len, u8 *mac);
+ int sha256_prf(const u8 *key, size_t key_len, const char *label,
+ 	       const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot