diff options
-rw-r--r-- | external/unbound/configure_checks.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/external/unbound/configure_checks.cmake b/external/unbound/configure_checks.cmake index b65b48c23..ead51e98f 100644 --- a/external/unbound/configure_checks.cmake +++ b/external/unbound/configure_checks.cmake @@ -59,7 +59,6 @@ check_function_exists(endservent HAVE_ENDSERVENT) check_function_exists(fnctl HAVE_FNCTL) check_function_exists(fork HAVE_FORK) check_function_exists(fseeko HAVE_FSEEKO) -check_function_exists(getaddrinfo HAVE_GETADDRINFO) check_function_exists(getentropy HAVE_GETENTROPY) check_function_exists(getpwnam HAVE_GETPWNAM) check_function_exists(getrlimit HAVE_GETRLIMIT) @@ -100,6 +99,17 @@ check_function_exists(usleep HAVE_USLEEP) check_function_exists(writev HAVE_WRITEV) check_function_exists(_beginthreadex HAVE__BEGINTHREADEX) +set(getaddrinfo_headers) +if (HAVE_NETDB_H) + list(APPEND getaddrinfo_headers "netdb.h") +endif () +if (HAVE_WS2TCPIP_H) + list(APPEND getaddrinfo_headers "ws2tcpip.h") +endif () +check_symbol_exists(getaddrinfo "${getaddrinfo_headers}" HAVE_GETADDRINFO) + +check_function_exists(getaddrinfo HAVE_GETADDRINFO) + function (check_type_exists type variable header default) set(CMAKE_EXTRA_INCLUDE_FILES "${header}") check_type_size("${type}" "${variable}") |