From c38b3d399ba6902fcc96477cbd4f2795029da0c0 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 33a79dde..9803964f 100644 --- a/configure.ac +++ b/configure.ac @@ -408,7 +408,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 @@ -523,6 +523,9 @@ cares_all_includes=" #ifdef HAVE_RESOLV_H # include #endif +#ifdef HAVE_SYS_SYSTEM_PROPERTIES_H +# include +#endif #ifdef HAVE_IPHLPAPI_H # include #endif