From: Jiri Slaby <jslaby@suse.cz>
Date: Thu, 16 Apr 2026 07:07:30 +0200
Subject: Linux kernel: leancrypto_kernel_rng_tester: include linux/hex.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
References: build-fix
Patch-mainline: submitted https://github.com/smuellerDD/leancrypto/pull/59

Since commit 24c776355f40 ("kernel.h: drop hex.h and update all hex.h
users"), hex.h is not included from kernel.h. It needs to be included in
each file using the functions. That is the case in
leancrypto_kernel_rng_tester:
 ../drng/tests/leancrypto_kernel_rng_tester.c: In function 'lc_seeded_rng_test':
 ../drng/tests/leancrypto_kernel_rng_tester.c:43:9: error: implicit declaration of function 'bin2hex' [-Wimplicit-function-declaration]
    43 |         bin2hex(hex, outbuf, sizeof(outbuf));
       |         ^~~~~~~

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drng/tests/leancrypto_kernel_rng_tester.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drng/tests/leancrypto_kernel_rng_tester.c b/drng/tests/leancrypto_kernel_rng_tester.c
index 358e982e6975..a4e2028f9c3c 100644
--- a/drng/tests/leancrypto_kernel_rng_tester.c
+++ b/drng/tests/leancrypto_kernel_rng_tester.c
@@ -20,6 +20,7 @@
 
 #include <crypto/rng.h>
 #include <linux/err.h>
+#include <linux/hex.h>
 #include <linux/module.h>
 
 static int lc_seeded_rng_test(void)
-- 
2.53.0

