mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-01-06 14:21:55 +03:00
Fix getaddrinfo and gethostbyname build problems on Solaris.
This commit is contained in:
@@ -35,7 +35,15 @@ if (WIN32)
|
||||
set(HAVE_SELECT TRUE)
|
||||
else (WIN32)
|
||||
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
|
||||
if (NOT HAVE_GETADDRINFO)
|
||||
check_library_exists("socket" "getaddrinfo" "" HAVE_LIB_GETADDRINFO)
|
||||
set(HAVE_GETADDRINFO 1)
|
||||
endif (NOT HAVE_GETADDRINFO)
|
||||
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
if (NOT HAVE_GETHOSTBYNAME)
|
||||
check_library_exists("nsl" "gethostbyname" "" HAVE_LIB_GETHOSTBYNAME)
|
||||
set(HAVE_GETHOSTBYNAME 1)
|
||||
endif (NOT HAVE_GETHOSTBYNAME)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(select HAVE_SELECT)
|
||||
check_function_exists(regcomp HAVE_REGCOMP)
|
||||
|
||||
@@ -35,6 +35,20 @@ if (WIN32)
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
if (HAVE_LIB_GETHOSTBYNAME)
|
||||
set(LIBSSH_LINK_LIBRARIES
|
||||
${LIBSSH_LINK_LIBRARIES}
|
||||
nsl
|
||||
)
|
||||
endif (HAVE_LIB_GETHOSTBYNAME)
|
||||
|
||||
if (HAVE_LIB_GETADDRINFO)
|
||||
set(LIBSSH_LINK_LIBRARIES
|
||||
${LIBSSH_LINK_LIBRARIES}
|
||||
socket
|
||||
)
|
||||
endif (HAVE_LIB_GETADDRINFO)
|
||||
|
||||
if (CRYPTO_LIBRARY)
|
||||
set(LIBSSH_PRIVATE_INCLUDE_DIRS
|
||||
${LIBSSH_PRIVATE_INCLUDE_DIRS}
|
||||
|
||||
Reference in New Issue
Block a user