From 42469b0b112be0daac2d4c4492f330599b62866e Mon Sep 17 00:00:00 2001 From: Brad House Date: Fri, 25 Oct 2024 07:03:06 -0400 Subject: [PATCH] Android: <= 7 might require sys/system_properties.h The autotools rewrite in c-ares 1.25 might have broken detection of __system_property_get() which is needed on Android versions prior to v8 in order to read DNS server settings. This might fix #907 Authored-By: Brad House (@bradh352) --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4afa3635..bd37ce49 100644 --- a/configure.ac +++ b/configure.ac @@ -363,7 +363,7 @@ AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]), dnl check for a few basic system headers we need. It would be nice if we could dnl split these on separate lines, but for some reason autotools on Windows doesn't dnl allow this, even tried ending lines with a backslash. -AC_CHECK_HEADERS([malloc.h memory.h AvailabilityMacros.h sys/types.h sys/time.h sys/select.h sys/socket.h sys/filio.h sys/ioctl.h sys/param.h sys/uio.h sys/random.h sys/event.h sys/epoll.h assert.h iphlpapi.h netioapi.h netdb.h netinet/in.h netinet6/in6.h netinet/tcp.h net/if.h ifaddrs.h fcntl.h errno.h socket.h strings.h stdbool.h time.h poll.h limits.h arpa/nameser.h arpa/nameser_compat.h arpa/inet.h ], +AC_CHECK_HEADERS([malloc.h memory.h AvailabilityMacros.h sys/types.h sys/time.h sys/select.h sys/socket.h sys/filio.h sys/ioctl.h sys/param.h sys/uio.h sys/random.h sys/event.h sys/epoll.h assert.h iphlpapi.h netioapi.h netdb.h netinet/in.h netinet6/in6.h netinet/tcp.h net/if.h ifaddrs.h fcntl.h errno.h socket.h strings.h stdbool.h time.h poll.h limits.h arpa/nameser.h arpa/nameser_compat.h arpa/inet.h sys/system_properties.h ], dnl to do if not found [], dnl to do if found @@ -478,6 +478,9 @@ cares_all_includes=" #ifdef HAVE_RESOLV_H # include #endif +#ifdef HAVE_SYS_SYSTEM_PROPERTIES_H +# include +#endif #ifdef HAVE_IPHLPAPI_H # include #endif