diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-01-13 14:22:36 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-01-13 14:22:36 -0800 |
commit | 1346e31a8ee962c40b1f18cb8ff1d5fe866744e3 (patch) | |
tree | 57b5ec7d8bdf094dcce714c52315dc845208ed05 | |
parent | 54f25b14ee629bc2d8e68f2b373b832cfef522f7 (diff) | |
download | infinitytier-1346e31a8ee962c40b1f18cb8ff1d5fe866744e3.tar.gz infinitytier-1346e31a8ee962c40b1f18cb8ff1d5fe866744e3.zip |
Windows build fixes, Software update fix, warning removal.
-rw-r--r-- | node/Multicaster.hpp | 2 | ||||
-rw-r--r-- | one.cpp | 4 | ||||
-rw-r--r-- | service/SoftwareUpdater.cpp | 8 | ||||
-rw-r--r-- | windows/ZeroTierOne/ZeroTierOne.vcxproj | 8 | ||||
-rw-r--r-- | windows/ZeroTierOne/ZeroTierOne.vcxproj.filters | 9 |
5 files changed, 17 insertions, 14 deletions
diff --git a/node/Multicaster.hpp b/node/Multicaster.hpp index 5c94cd3a..32dec9cf 100644 --- a/node/Multicaster.hpp +++ b/node/Multicaster.hpp @@ -220,7 +220,7 @@ private: { _GatherAuthKey() : member(0),networkId(0) {} _GatherAuthKey(const uint64_t nwid,const Address &a) : member(a.toInt()),networkId(nwid) {} - inline unsigned long hashCode() const { return (member ^ networkId); } + inline unsigned long hashCode() const { return (unsigned long)(member ^ networkId); } inline bool operator==(const _GatherAuthKey &k) const { return ((member == k.member)&&(networkId == k.networkId)); } uint64_t member; uint64_t networkId; @@ -495,7 +495,7 @@ static int cli(int argc,char **argv) (std::string("/network/") + arg1).c_str(), requestHeaders, jsons, - strlen(jsons), + (unsigned long)strlen(jsons), responseHeaders, responseBody); if (scode == 200) { @@ -572,7 +572,7 @@ static int idtool(int argc,char **argv) int vanityBits = 0; if (argc >= 5) { vanity = Utils::hexStrToU64(argv[4]) & 0xffffffffffULL; - vanityBits = 4 * strlen(argv[4]); + vanityBits = 4 * (int)strlen(argv[4]); if (vanityBits > 40) vanityBits = 40; } diff --git a/service/SoftwareUpdater.cpp b/service/SoftwareUpdater.cpp index 299c0d97..f6572cfc 100644 --- a/service/SoftwareUpdater.cpp +++ b/service/SoftwareUpdater.cpp @@ -21,6 +21,9 @@ #include <string.h> #include <stdint.h> +#include "../node/Constants.hpp" +#include "../version.h" + #ifdef __WINDOWS__ #include <WinSock2.h> #include <Windows.h> @@ -37,9 +40,6 @@ #include "SoftwareUpdater.hpp" -#include "../version.h" - -#include "../node/Constants.hpp" #include "../node/Utils.hpp" #include "../node/SHA512.hpp" #include "../node/Buffer.hpp" @@ -369,7 +369,7 @@ void SoftwareUpdater::apply() PROCESS_INFORMATION pi; memset(&si,0,sizeof(si)); memset(&pi,0,sizeof(pi)); - CreateProcessA(NULL,updatePath.c_str(),NULL,NULL,FALSE,CREATE_NO_WINDOW|CREATE_NEW_PROCESS_GROUP,NULL,NULL,&si,&pi); + CreateProcessA(NULL,const_cast<LPSTR>(updatePath.c_str()),NULL,NULL,FALSE,CREATE_NO_WINDOW|CREATE_NEW_PROCESS_GROUP,NULL,NULL,&si,&pi); #else char *argv[256]; unsigned long ac = 0; diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index fc259ebf..2a6545eb 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -255,7 +255,7 @@ <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories> </AdditionalIncludeDirectories> - <PreprocessorDefinitions>NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions)</PreprocessorDefinitions> <DisableSpecificWarnings>4996</DisableSpecificWarnings> </ClCompile> <Link> @@ -271,7 +271,7 @@ <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories> </AdditionalIncludeDirectories> - <PreprocessorDefinitions>NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_RULES_ENGINE_DEBUGGING;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_RULES_ENGINE_DEBUGGING;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions)</PreprocessorDefinitions> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableSpecificWarnings>4996</DisableSpecificWarnings> </ClCompile> @@ -291,7 +291,7 @@ <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories> </AdditionalIncludeDirectories> - <PreprocessorDefinitions>STATICLIB;ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>STATICLIB;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;ZT_SOFTWARE_UPDATE_DEFAULT="apply";%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet> <StringPooling>true</StringPooling> @@ -317,7 +317,7 @@ <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories> </AdditionalIncludeDirectories> - <PreprocessorDefinitions>STATICLIB;ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="apply";ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> <StringPooling>true</StringPooling> diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters index 1fa39abd..8a426d4b 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters @@ -264,6 +264,9 @@ <ClCompile Include="..\..\controller\JSONDB.cpp"> <Filter>Source Files\controller</Filter> </ClCompile> + <ClCompile Include="..\..\service\SoftwareUpdater.cpp"> + <Filter>Source Files\service</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="resource.h"> @@ -293,9 +296,6 @@ <ClInclude Include="..\..\service\ControlPlane.hpp"> <Filter>Header Files\service</Filter> </ClInclude> - <ClInclude Include="..\..\service\ControlPlaneSubsystem.hpp"> - <Filter>Header Files\service</Filter> - </ClInclude> <ClInclude Include="..\..\service\OneService.hpp"> <Filter>Header Files\service</Filter> </ClInclude> @@ -554,6 +554,9 @@ <ClInclude Include="..\..\osdep\ManagedRoute.hpp"> <Filter>Header Files\osdep</Filter> </ClInclude> + <ClInclude Include="..\..\service\SoftwareUpdater.hpp"> + <Filter>Header Files\service</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="ZeroTierOne.rc"> |