1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

cmake: Set HAVE_GETADDRINFO if we have libsocket.

This fixes the build on Solaris.
This commit is contained in:
Andreas Schneider
2013-07-24 07:54:11 +02:00
parent 448738eb00
commit 90e5ce3c3e

View File

@ -122,7 +122,8 @@ if (UNIX)
# libsocket (Solaris)
check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET)
if (HAVE_LIBSOCKET)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} socket)
set(HAVE_GETADDRINFO 1)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} socket)
endif (HAVE_LIBSOCKET)
# libnsl/inet_pton (Solaris)