diff --git a/src/common/crypto.c b/src/common/crypto.c index 96a1f7c00..3fba2da5d 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -29,6 +29,21 @@ #include "crypto_ed25519.h" #include "crypto_format.h" +DISABLE_GCC_WARNING(redundant-decls) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +ENABLE_GCC_WARNING(redundant-decls) + #if __GNUC__ && GCC_VERSION >= 402 #if GCC_VERSION >= 406 #pragma GCC diagnostic pop diff --git a/src/common/crypto_openssl_mgt.c b/src/common/crypto_openssl_mgt.c index c19da5b9f..ca91e12d1 100644 --- a/src/common/crypto_openssl_mgt.c +++ b/src/common/crypto_openssl_mgt.c @@ -12,6 +12,21 @@ #include "crypto_openssl_mgt.h" +DISABLE_GCC_WARNING(redundant-decls) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +ENABLE_GCC_WARNING(redundant-decls) + #ifndef NEW_THREAD_API /** A number of preallocated mutexes for use by OpenSSL. */ static tor_mutex_t **openssl_mutexes_ = NULL; diff --git a/src/common/crypto_openssl_mgt.h b/src/common/crypto_openssl_mgt.h index 9b887abd5..09b673796 100644 --- a/src/common/crypto_openssl_mgt.h +++ b/src/common/crypto_openssl_mgt.h @@ -18,21 +18,6 @@ #include -DISABLE_GCC_WARNING(redundant-decls) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -ENABLE_GCC_WARNING(redundant-decls) - /* Macro to create an arbitrary OpenSSL version number as used by OPENSSL_VERSION_NUMBER or SSLeay(), since the actual numbers are a bit hard