diff --git a/CMakeLists.txt b/CMakeLists.txt index a63c5731..54fd41d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,6 +207,7 @@ CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H) CHECK_INCLUDE_FILES (netdb.h HAVE_NETDB_H) CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H) +CHECK_INCLUDE_FILES (netinet6/in6.h HAVE_NETINET6_IN6_H) # On old MacOS SDK versions, you must include sys/socket.h before net/if.h IF (HAVE_SYS_SOCKET_H) CHECK_INCLUDE_FILES ("sys/socket.h;net/if.h" HAVE_NET_IF_H) @@ -323,6 +324,7 @@ CARES_EXTRAINCLUDE_IFSET (HAVE_NETDB_H netdb.h) CARES_EXTRAINCLUDE_IFSET (HAVE_NET_IF_H net/if.h) CARES_EXTRAINCLUDE_IFSET (HAVE_IFADDRS_H ifaddrs.h) CARES_EXTRAINCLUDE_IFSET (HAVE_NETINET_IN_H netinet/in.h) +CARES_EXTRAINCLUDE_IFSET (HAVE_NETINET6_IN6_H netinet6/in6.h) CARES_EXTRAINCLUDE_IFSET (HAVE_NETINET_TCP_H netinet/tcp.h) CARES_EXTRAINCLUDE_IFSET (HAVE_SIGNAL_H signal.h) CARES_EXTRAINCLUDE_IFSET (HAVE_STDLIB_H stdlib.h) diff --git a/configure.ac b/configure.ac index 1a3ba8c3..d1f109d5 100644 --- a/configure.ac +++ b/configure.ac @@ -436,6 +436,7 @@ AC_CHECK_HEADERS( netioapi.h \ netdb.h \ netinet/in.h \ + netinet6/in6.h \ netinet/tcp.h \ net/if.h \ ifaddrs.h \ diff --git a/src/lib/ares_config.h.cmake b/src/lib/ares_config.h.cmake index 01dcccaa..10a1b7a9 100644 --- a/src/lib/ares_config.h.cmake +++ b/src/lib/ares_config.h.cmake @@ -212,6 +212,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETINET_IN_H +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET6_IN6_H + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETINET_TCP_H diff --git a/src/lib/ares_ipv6.h b/src/lib/ares_ipv6.h index be8cbe98..28d7851f 100644 --- a/src/lib/ares_ipv6.h +++ b/src/lib/ares_ipv6.h @@ -27,6 +27,10 @@ #ifndef ARES_IPV6_H #define ARES_IPV6_H +#ifdef HAVE_NETINET6_IN6_H +# include +#endif + #ifndef HAVE_PF_INET6 # define PF_INET6 AF_INET6 #endif