]> source.dussan.org Git - tigervnc.git/commitdiff
Windows actually has socklen_t, it's just that it is in a special header.
authorPierre Ossman <ossman@cendio.se>
Tue, 8 Mar 2011 13:05:27 +0000 (13:05 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 8 Mar 2011 13:05:27 +0000 (13:05 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4327 3789f03b-4d11-0410-bbf8-ca57d06f2519

CMakeLists.txt
common/network/TcpSocket.cxx
common/os/net.c

index f904b49a93d8d508b097b3049bd5c2aff25781b7..40017c5511aa0a2c338948f8fb85d9e9255b672d 100644 (file)
@@ -118,12 +118,13 @@ include(CheckIncludeFiles)
 include(CheckFunctionExists)
 include(CheckTypeSize)
 if(WIN32)
-  set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
+  set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h)
   set(CMAKE_REQUIRED_LIBRARIES ws2_32)
+else()
+  set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
 endif()
 check_function_exists(inet_aton HAVE_INET_ATON)
 check_function_exists(inet_ntop HAVE_INET_NTOP)
-set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
 check_type_size(socklen_t SOCKLEN_T)
 
 set(CMAKE_EXTRA_INCLUDE_FILES) 
index 04e0895029dad9271777387a3f7f9d2409b79858..7e11588120ed7a651a289afb9a8220af43485302 100644 (file)
@@ -23,6 +23,7 @@
 #ifdef WIN32
 //#include <io.h>
 #include <winsock2.h>
+#include <ws2tcpip.h>
 #define errorNumber WSAGetLastError()
 #else
 #define errorNumber errno
index 5c0ac2d376414174dd3b646011ea3cc27412c82e..7bad36c9f4fc77c3d1120aa222e83cf2e3564378 100644 (file)
@@ -25,6 +25,7 @@
 
 #ifdef WIN32
 #include <winsock2.h>
+#include <ws2tcpip.h>
 #else
 #include <sys/socket.h>
 #include <netinet/in.h>