Skip to content

Commit

Permalink
Fixed openssl/types.h include for ubuntu20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Dec 27, 2023
1 parent 3100118 commit 172d1dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cpr/ssl_ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@
#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/types.h>
#include <openssl/x509.h>
#include <openssl/x509_vfy.h>

// 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(<openssl/types.h>)
#include <openssl/types.h>
#endif

namespace cpr {

/**
Expand Down

0 comments on commit 172d1dc

Please sign in to comment.