]> granicus.if.org Git - libevent/commitdiff
cmake/solaris: set CMAKE_REQUIRED_LIBRARIES to fix functions detections
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 9 Aug 2016 21:27:59 +0000 (00:27 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 9 Aug 2016 21:34:44 +0000 (00:34 +0300)
Otherwise we will not detect next functions for instance:
- gethostbyname_r # and related

And now both autotools/cmake builds passes all regress tests in basic env (on
solaris of course).

Fixes: dns/client_fail_requests_getaddrinfo
CMakeLists.txt

index 7ea28e089d6bfc7b56a10f2840a2e6aade826107..81d3ce1492aa676c1d343a10f81e7b6bca1172ef 100644 (file)
@@ -215,6 +215,9 @@ if(WIN32)
     set(CMAKE_REQUIRED_LIBRARIES  ws2_32.lib)
     set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h)
 endif()
+if (SOLARIS)
+    set(CMAKE_REQUIRED_LIBRARIES socket nsl)
+endif()
 
 # Check if _GNU_SOURCE is available.
 CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)