Include netinet6/in6.h (#728)

On some platforms, "netinet6/in6.h" is not included by "netinet/in.h"
and needs to be included separately.

Fix By: Faraz (@farazrbx)
pull/730/head
Faraz 8 months ago committed by GitHub
parent fab65acae9
commit 60bc2cf902
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CMakeLists.txt
  2. 1
      configure.ac
  3. 3
      src/lib/ares_config.h.cmake
  4. 4
      src/lib/ares_ipv6.h

@ -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)

@ -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 \

@ -212,6 +212,9 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine HAVE_NETINET_IN_H
/* Define to 1 if you have the <netinet6/in6.h> header file. */
#cmakedefine HAVE_NETINET6_IN6_H
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#cmakedefine HAVE_NETINET_TCP_H

@ -27,6 +27,10 @@
#ifndef ARES_IPV6_H
#define ARES_IPV6_H
#ifdef HAVE_NETINET6_IN6_H
# include <netinet6/in6.h>
#endif
#ifndef HAVE_PF_INET6
# define PF_INET6 AF_INET6
#endif

Loading…
Cancel
Save