mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
fix solaris build - inet_aton is in non-default library
This commit is contained in:
parent
db1b3d2d7d
commit
5b4ce3ce2c
1 changed files with 2 additions and 8 deletions
|
@ -58,17 +58,11 @@ TARGET_LINK_LIBRARIES(perror mysys)
|
|||
|
||||
ADD_EXECUTABLE(resolveip resolveip.c)
|
||||
TARGET_LINK_LIBRARIES(resolveip mysys)
|
||||
# On Solaris, inet_aton() function used by resolveip could be in resolv library
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
|
||||
IF(NOT HAVE_INET_ATON)
|
||||
CHECK_LIBRARY_EXISTS(resolv inet_aton "" HAVE_INET_ATON_IN_RESOLV)
|
||||
IF(HAVE_INET_ATON_IN_RESOLV)
|
||||
TARGET_LINK_LIBRARIES(resolveip resolv)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MY_SEARCH_LIBS(inet_aton "nsl;socket;resolv" SOLARIS_NSL)
|
||||
TARGET_LINK_LIBRARIES(resolveip ${SOLARIS_NSL})
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue