]> source.dussan.org Git - tigervnc.git/commitdiff
Fixed socklen_t test unix compatible.
authorHenrik Andersson <henrik.andersson@cendio.com>
Tue, 8 Mar 2011 13:00:12 +0000 (13:00 +0000)
committerHenrik Andersson <henrik.andersson@cendio.com>
Tue, 8 Mar 2011 13:00:12 +0000 (13:00 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4326 3789f03b-4d11-0410-bbf8-ca57d06f2519

CMakeLists.txt
config.h.cmake.in

index bb62bb4d5134c11137305cbdc24eda8c7beeb80f..f904b49a93d8d508b097b3049bd5c2aff25781b7 100644 (file)
@@ -116,10 +116,16 @@ endif()
 # Generate config.h
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
-set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
-set(CMAKE_REQUIRED_LIBRARIES ws2_32)
+include(CheckTypeSize)
+if(WIN32)
+  set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
+  set(CMAKE_REQUIRED_LIBRARIES ws2_32)
+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) 
 set(CMAKE_REQUIRED_LIBRARIES)
 check_function_exists(snprintf HAVE_SNPRINTF)
index fef36495970f5385e1bcdda09b643cbf7e907270..54f6035cda4f8160c35d11c6ab6455c51a806085 100644 (file)
@@ -1,3 +1,4 @@
+#cmakedefine HAVE_SOCKLEN_T
 #cmakedefine HAVE_INET_ATON
 #cmakedefine HAVE_INET_NTOP
 #cmakedefine HAVE_SNPRINTF