Browse Source

Build fix for Windows setsockopt().

Adam Ierymenko 11 years ago
parent
commit
eae130467b
2 changed files with 5 additions and 5 deletions
  1. 4 4
      node/SocketManager.cpp
  2. 1 1
      windows/ZeroTierOne/ZeroTierOne.vcxproj

+ 4 - 4
node/SocketManager.cpp

@@ -245,14 +245,14 @@ SocketManager::SocketManager(
 				int bs = 1048576;
 				while (bs >= 65536) {
 					int tmpbs = bs;
-					if (setsockopt(s,SOL_SOCKET,SO_RCVBUF,&tmpbs,sizeof(tmpbs)) == 0)
+					if (setsockopt(s,SOL_SOCKET,SO_RCVBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
 						break;
 					bs -= 16384;
 				}
 				bs = 1048576;
 				while (bs >= 65536) {
 					int tmpbs = bs;
-					if (setsockopt(s,SOL_SOCKET,SO_SNDBUF,&tmpbs,sizeof(tmpbs)) == 0)
+					if (setsockopt(s,SOL_SOCKET,SO_SNDBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
 						break;
 					bs -= 16384;
 				}
@@ -319,14 +319,14 @@ SocketManager::SocketManager(
 				int bs = 1048576;
 				while (bs >= 65536) {
 					int tmpbs = bs;
-					if (setsockopt(s,SOL_SOCKET,SO_RCVBUF,&tmpbs,sizeof(tmpbs)) == 0)
+					if (setsockopt(s,SOL_SOCKET,SO_RCVBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
 						break;
 					bs -= 16384;
 				}
 				bs = 1048576;
 				while (bs >= 65536) {
 					int tmpbs = bs;
-					if (setsockopt(s,SOL_SOCKET,SO_SNDBUF,&tmpbs,sizeof(tmpbs)) == 0)
+					if (setsockopt(s,SOL_SOCKET,SO_SNDBUF,(const char *)&tmpbs,sizeof(tmpbs)) == 0)
 						break;
 					bs -= 16384;
 				}

+ 1 - 1
windows/ZeroTierOne/ZeroTierOne.vcxproj

@@ -244,7 +244,7 @@
       <AdditionalIncludeDirectories>$(SolutionDir)\ext\bin\libcrypto\include</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
       <StringPooling>true</StringPooling>
     </ClCompile>
     <Link>