From ba0d73d102e09b6d60f1d677b1e5472a25c08d42 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 20 Apr 2017 10:21:40 -0700 Subject: [PATCH] Windows build fixes. --- controller/JSONDB.cpp | 2 +- service/OneService.cpp | 3 ++- windows/ZeroTierOne/ZeroTierOne.vcxproj | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp index afc0631d8..007e0fec0 100644 --- a/controller/JSONDB.cpp +++ b/controller/JSONDB.cpp @@ -64,7 +64,7 @@ bool JSONDB::writeRaw(const std::string &n,const std::string &obj) Utils::snprintf(tmp,sizeof(tmp),"%lu",(unsigned long)obj.length()); reqHeaders["Content-Length"] = tmp; reqHeaders["Content-Type"] = "application/json"; - const unsigned int sc = Http::PUT(1048576,ZT_JSONDB_HTTP_TIMEOUT,reinterpret_cast(&_httpAddr),(_basePath+"/"+n).c_str(),reqHeaders,obj.data(),obj.length(),headers,body); + const unsigned int sc = Http::PUT(1048576,ZT_JSONDB_HTTP_TIMEOUT,reinterpret_cast(&_httpAddr),(_basePath+"/"+n).c_str(),reqHeaders,obj.data(),(unsigned long)obj.length(),headers,body); return (sc == 200); } else { const std::string path(_genPath(n,true)); diff --git a/service/OneService.cpp b/service/OneService.cpp index 5f2adfe35..a9185eeab 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1530,7 +1530,8 @@ public: json &controllerDbHttpPath = settings["controllerDbHttpPath"]; if ((controllerDbHttpHost.is_string())&&(controllerDbHttpPort.is_number())) { _controllerDbPath = "http://"; - _controllerDbPath.append(controllerDbHttpHost); + std::string h = controllerDbHttpHost; + _controllerDbPath.append(h); char dbp[128]; Utils::snprintf(dbp,sizeof(dbp),"%d",(int)controllerDbHttpPort); _controllerDbPath.push_back(':'); diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 96de5d2bd..9715f3d99 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -360,12 +360,13 @@ STATICLIB;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;ZT_SOFTWARE_UPDATE_DEFAULT="apply";ZT_BUILD_PLATFORM=2;ZT_BUILD_ARCHITECTURE=1;%(PreprocessorDefinitions) MultiThreaded - NoExtensions + StreamingSIMDExtensions2 true AnySuitable Speed true 4996 + Guard true