summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-03-14 12:12:28 (GMT)
committerTobias Markmann <tm@ayena.de>2018-03-14 12:12:56 (GMT)
commit44581c5285d13c0ec715b35ddc79177e5ebeef39 (patch)
treea8a6152ad542a526ddf16373fd11321d218aeb38 /Swiften/TLS
parentc8e14baa975d929941fe3d7dabd77667505c3f2b (diff)
downloadswift-44581c5285d13c0ec715b35ddc79177e5ebeef39.zip
swift-44581c5285d13c0ec715b35ddc79177e5ebeef39.tar.bz2
Fix building with OpenSSL on Windows
Define NOMINMAX when building OpenSSL backend on Windows and otherwise you cannot use std::numeric_limits<T>::max. Test-Information: Swiften builds on Windows 10 with VS2015 with the OpenSSL TLS backend. Change-Id: I9621c14426a0af2280cef7ee973abcff2fd0a48d
Diffstat (limited to 'Swiften/TLS')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp1
-rw-r--r--Swiften/TLS/SConscript2
2 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index 6cbd303..89917ee 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -3,6 +3,7 @@
* All rights reserved.
* See the COPYING file for more information.
*/
+
#include <Swiften/Base/Platform.h>
#ifdef SWIFTEN_PLATFORM_WINDOWS
diff --git a/Swiften/TLS/SConscript b/Swiften/TLS/SConscript
index ec9edd5..a79e6a1 100644
--- a/Swiften/TLS/SConscript
+++ b/Swiften/TLS/SConscript
@@ -20,6 +20,8 @@ if myenv.get("HAVE_OPENSSL", 0) :
"OpenSSL/OpenSSLCertificateFactory.cpp",
])
myenv.Append(CPPDEFINES = "HAVE_OPENSSL")
+ if myenv["PLATFORM"] == "win32" :
+ myenv.Append(CPPDEFINES = "NOMINMAX")
elif myenv.get("HAVE_SCHANNEL", 0) :
swiften_env.Append(LIBS = ["Winscard"])
objects += myenv.SwiftenObject([