diff options
Diffstat (limited to 'Swiften/TLS')
-rw-r--r-- | Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp | 5 | ||||
-rw-r--r-- | Swiften/TLS/SConscript | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp index 5d9aac2..3f134e7 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp +++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp @@ -6,10 +6,11 @@ #include "Swiften/TLS/OpenSSL/OpenSSLCertificate.h" -#include <openssl/x509v3.h> - #include "Swiften/Base/ByteArray.h" +#undef X509_NAME // Windows.h defines this, and for some reason, it doesn't get undeffed properly in x509.h +#include <openssl/x509v3.h> + #pragma GCC diagnostic ignored "-Wold-style-cast" namespace Swift { diff --git a/Swiften/TLS/SConscript b/Swiften/TLS/SConscript index bb33239..7408e72 100644 --- a/Swiften/TLS/SConscript +++ b/Swiften/TLS/SConscript @@ -7,16 +7,14 @@ objects = swiften_env.StaticObject([ "TLSContextFactory.cpp", ]) -if swiften_env.get("HAVE_OPENSSL", 0) : - objects += swiften_env.StaticObject([ +myenv = swiften_env.Clone() +if myenv.get("HAVE_OPENSSL", 0) : + myenv.MergeFlags(myenv["OPENSSL_FLAGS"]) + objects += myenv.StaticObject([ "OpenSSL/OpenSSLContext.cpp", "OpenSSL/OpenSSLCertificate.cpp", "OpenSSL/OpenSSLContextFactory.cpp", ]) - -myenv = swiften_env.Clone() -if myenv.get("HAVE_OPENSSL", 0) : - myenv.MergeFlags("OPENSSL_FLAGS") myenv.Append(CPPDEFINES = "HAVE_OPENSSL") objects += myenv.StaticObject(["PlatformTLSContextFactory.cpp"]) |