From aab9e38894b1864a0ed541c6b4d5ae30a0589f36 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 3 Jun 2026 15:10:13 +0900 Subject: [PATCH] Fix x64 CPU feature macro guard CRYPTOPP_BOOL_X64 is defined as 0 on non-x64 builds, so #ifdef made HasSSE2() and HasISSE() always true. Use #if so non-x64 builds follow runtime feature detection and DisableCPUExtendedFeatures(). --- src/Crypto/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h index 507ef184..b8e02b3e 100644 --- a/src/Crypto/cpu.h +++ b/src/Crypto/cpu.h @@ -266,7 +266,7 @@ int CpuId(uint32 input, uint32 output[4]); // been enabled by DetectX86Features. void DisableCPUExtendedFeatures (); -#ifdef CRYPTOPP_BOOL_X64 +#if CRYPTOPP_BOOL_X64 #define HasSSE2() 1 #define HasISSE() 1 #else