diff --git a/wolfssl/wolfcrypt/hash.h b/wolfssl/wolfcrypt/hash.h index 5c1a6d661a..5738842133 100644 --- a/wolfssl/wolfcrypt/hash.h +++ b/wolfssl/wolfcrypt/hash.h @@ -94,7 +94,10 @@ enum wc_HashFlags { }; #ifndef NO_HASH_WRAPPER -typedef union { +typedef struct { +#if HAVE_ANONYMOUS_INLINE_AGGREGATES + union { +#endif #ifndef NO_MD5 wc_Md5 md5; #endif @@ -119,6 +122,9 @@ typedef union { #ifdef WOLFSSL_SM3 wc_Sm3 sm3; #endif +#if HAVE_ANONYMOUS_INLINE_AGGREGATES + }; +#endif unsigned int isAllocated:1; /* flag indicates if structure was allocated */ } wc_HashAlg; #endif /* !NO_HASH_WRAPPER */