From: Randall S. Becker Date: Mon, 29 Mar 2021 16:26:10 +0000 (-0600) Subject: Added guarding #ifndef/#define to avoid duplicate include of crypto/types.h X-Git-Tag: openssl-3.0.0-alpha14~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35bc387b97a51343456d1d72e19a64779d2224f3;p=thirdparty%2Fopenssl.git Added guarding #ifndef/#define to avoid duplicate include of crypto/types.h Fixes #14730 CLA: The author has the permission to grant the OpenSSL Team the right to use this change. Signed-off-by: Randall S. Becker Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14729) --- diff --git a/include/crypto/types.h b/include/crypto/types.h index 13a5f9ce1d7..0d814040912 100644 --- a/include/crypto/types.h +++ b/include/crypto/types.h @@ -9,15 +9,21 @@ /* When removal is simulated, we still need the type internally */ -#ifdef OPENSSL_NO_DEPRECATED_3_0 +#ifndef OSSL_CRYPTO_TYPES_H +# define OSSL_CRYPTO_TYPES_H +# pragma once + +# ifdef OPENSSL_NO_DEPRECATED_3_0 typedef struct rsa_st RSA; typedef struct rsa_meth_st RSA_METHOD; -# ifndef OPENSSL_NO_EC +# ifndef OPENSSL_NO_EC typedef struct ec_key_st EC_KEY; typedef struct ec_key_method_st EC_KEY_METHOD; +# endif # endif -#endif -#ifndef OPENSSL_NO_EC +# ifndef OPENSSL_NO_EC typedef struct ecx_key_st ECX_KEY; +# endif + #endif