summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHongren Zheng <i@zenithal.me>2024-05-24 14:12:47 +0800
committerMatt Caswell <matt@openssl.org>2024-07-12 11:09:02 +0100
commit6cf42ad392241c9fee586d99b53d9bfa74130b0b (patch)
tree6fb4469fdb75144740dec74a52d204279690357a /include
parent6eb648941e3ca0fff08876d1d8b849ad2a6b300a (diff)
riscv: Fix cpuid_obj asm checks for sm4/sm3
Similar to #22881 / #23752 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Yang <kaishen.yy@antfin.com> (Merged from https://github.com/openssl/openssl/pull/24486)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/sm4_platform.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crypto/sm4_platform.h b/include/crypto/sm4_platform.h
index 928dc17ff0..4d70d29145 100644
--- a/include/crypto/sm4_platform.h
+++ b/include/crypto/sm4_platform.h
@@ -38,7 +38,7 @@ static inline int vpsm4_ex_capable(void)
# define HWSM4_cbc_encrypt sm4_v8_cbc_encrypt
# define HWSM4_ecb_encrypt sm4_v8_ecb_encrypt
# define HWSM4_ctr32_encrypt_blocks sm4_v8_ctr32_encrypt_blocks
-# elif defined(__riscv) && __riscv_xlen == 64
+# elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64
/* RV64 support */
# include "riscv_arch.h"
/* Zvksed extension (vector crypto SM4). */