From 172d1dce6a099f32d31321b5aeee4675acec6ebb Mon Sep 17 00:00:00 2001 From: Fabian Sauter Date: Wed, 27 Dec 2023 19:13:02 +0100 Subject: [PATCH] Fixed openssl/types.h include for ubuntu20.04 --- cpr/ssl_ctx.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpr/ssl_ctx.cpp b/cpr/ssl_ctx.cpp index f628809bb..64f3d384c 100644 --- a/cpr/ssl_ctx.cpp +++ b/cpr/ssl_ctx.cpp @@ -11,10 +11,16 @@ #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. +#if __has_include() +#include +#endif + namespace cpr { /**