From 471730c84c5f68fdce10db8babb37e6e03af6dc5 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 14 Nov 2023 11:16:33 +0800 Subject: [PATCH] Resolve __has_include operator issue --- include/crypto/sm4.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/crypto/sm4.h b/include/crypto/sm4.h index a7faba076..f9b8ca12e 100644 --- a/include/crypto/sm4.h +++ b/include/crypto/sm4.h @@ -50,13 +50,15 @@ void SM4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks); * You can't use MSVC to build this feature since it has no 'x86intrin.h'. */ # ifndef OPENSSL_NO_SM4_NI -# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) -# if defined (__has_include) && (__has_include()) -# include -# if defined(__SSE__) && defined(__SSE2__) && defined(__SSE3__) && defined(__AES__) -# define USE_SM4_NI +# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) +# if defined __has_include +# if __has_include() +# include +# if defined(__SSE__) && defined(__SSE2__) && defined(__SSE3__) && defined(__AES__) +# define USE_SM4_NI void SM4_encrypt_affine_ni(const uint8_t *in, uint8_t *out, const SM4_KEY *ks); +# endif # endif # endif # endif