diff --git a/cpr/ssl_ctx.cpp b/cpr/ssl_ctx.cpp index f628809bb..ed5e09b13 100644 --- a/cpr/ssl_ctx.cpp +++ b/cpr/ssl_ctx.cpp @@ -11,10 +11,19 @@ #include #include #include -#include #include #include +// openssl/types.h was added in later version of openssl and is therefore not always available. +// This is for example the case on Ubuntu 20.04. +// We try to include it if available to satisfy clang-tidy. +// Ref: https://github.com/openssl/openssl/commit/50cd4768c6b89c757645f28519236bb989216f8d +#if __has_include() +#include +#else +#include +#endif + namespace cpr { /**