crypto/jitterentropy.c is deliberately compiled with -O0 and is not
supposed to depend on any kernel headers (see commit dfc9fa91938b
"crypto: jitterentropy - avoid compiler warnings").

We'll be changing include/linux/fips.h later in this series to include
other headers which break the build of jitterentropy.c due to gcc not
being able to constant propagate under -O0.

Just forward declare fips_enabled, which is the only thing
jitterentropy.o needs from this header anyway.

Signed-off-by: Vegard Nossum <[email protected]>
---
 crypto/jitterentropy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index 3f93cdc9a7af..d939f57667dd 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -146,10 +146,11 @@ struct rand_data {
 #define JENT_ENTROPY_SAFETY_FACTOR     64
 
 #include <linux/array_size.h>
-#include <linux/fips.h>
 #include <linux/minmax.h>
 #include "jitterentropy.h"
 
+extern int fips_enabled;
+
 /***************************************************************************
  * Adaptive Proportion Test
  *
-- 
2.39.3


Reply via email to