Skip to content

Commit

Permalink
Fix "macro expansion producing 'defined' has undefined behavior" clan…
Browse files Browse the repository at this point in the history
…g warning
  • Loading branch information
AMDmi3 committed Jun 27, 2018
1 parent a802940 commit 4ffbb46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libi2pd/Crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,12 @@ namespace crypto

// take care about openssl version
#include <openssl/opensslv.h>
#define LEGACY_OPENSSL ((OPENSSL_VERSION_NUMBER < 0x010100000) || defined(LIBRESSL_VERSION_NUMBER)) // 1.0.2 and below or LibreSSL
#if ((OPENSSL_VERSION_NUMBER < 0x010100000) || defined(LIBRESSL_VERSION_NUMBER)) // 1.0.2 and below or LibreSSL
# define LEGACY_OPENSSL 1
#else
# define LEGACY_OPENSSL 0
#endif

#if LEGACY_OPENSSL
// define getters and setters introduced in 1.1.0
inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
Expand Down

0 comments on commit 4ffbb46

Please sign in to comment.