From 5c7f60dfcf90584f6812e17f3270843591d3436a Mon Sep 17 00:00:00 2001 From: Ville Takio <93599126+flatstik@users.noreply.github.com> Date: Wed, 30 Sep 2026 11:52:30 +0000 Subject: [PATCH] Crypto: use VC_INLINE for the ARM CPU_Query helpers (#1886) C99 inline without static does not emit a function body, so aarch64 builds at -O0/-Os fail to link DetectArmFeatures (undefined reference to CPU_QueryAES / CPU_QuerySHA2). Use VC_INLINE like the other helpers in cpu.c. Signed-off-by: Ville Takio --- src/Crypto/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Crypto/cpu.c b/src/Crypto/cpu.c index 12e4be15..9cf05275 100644 --- a/src/Crypto/cpu.c +++ b/src/Crypto/cpu.c @@ -492,7 +492,7 @@ void DisableCPUExtendedFeatures () volatile int g_hasAESARM = 0; volatile int g_hasSHA256ARM = 0; -inline int CPU_QueryAES() +VC_INLINE int CPU_QueryAES() { #if defined(CRYPTOPP_ARM_AES_AVAILABLE) #if defined(__linux__) && defined(__aarch64__) @@ -516,7 +516,7 @@ inline int CPU_QueryAES() #endif } -inline int CPU_QuerySHA2() +VC_INLINE int CPU_QuerySHA2() { #if defined(CRYPTOPP_ARM_SHA2_AVAILABLE) #if defined(__linux__) && defined(__aarch64__)