···11+On darwin, providing SystemConfiguration to curl currently results in a
22+reference loop, so we have to disable the check for it and the feature
33+which requires it (NAT64).
44+55+Patching actual configure script here as we also don't want to require
66+autoconf in the bootstrap loop just to regenerate a patched configure.ac.
77+88+--- a/configure 2021-10-16 00:51:59.000000000 +0100
99++++ b/configure 2021-10-16 01:06:46.000000000 +0100
1010+@@ -20810,7 +20810,7 @@
1111+ if test "x$build_for_macos" != xno; then
1212+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1313+ printf "%s\n" "yes" >&6; }
1414+- LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
1515++ LDFLAGS="$LDFLAGS -framework CoreFoundation"
1616+ else
1717+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
1818+ printf "%s\n" "no" >&6; }
1919+@@ -22211,9 +22211,6 @@
2020+ fi
2121+2222+2323+-if test "$HAVE_GETHOSTBYNAME" != "1"; then
2424+- as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
2525+-fi
2626+2727+2828+ curl_includes_winsock2="\
2929+diff --git a/lib/curl_setup.h b/lib/curl_setup.h
3030+index 99048c489..19abfbbac 100644
3131+--- a/lib/curl_setup.h
3232++++ b/lib/curl_setup.h
3333+@@ -247,19 +247,6 @@
3434+ # include "setup-win32.h"
3535+ #endif
3636+3737+-/*
3838+- * Use getaddrinfo to resolve the IPv4 address literal. If the current network
3939+- * interface doesn't support IPv4, but supports IPv6, NAT64, and DNS64,
4040+- * performing this task will result in a synthesized IPv6 address.
4141+- */
4242+-#if defined(__APPLE__) && !defined(USE_ARES)
4343+-#include <TargetConditionals.h>
4444+-#define USE_RESOLVE_ON_IPS 1
4545+-# if defined(TARGET_OS_OSX) && TARGET_OS_OSX
4646+-# define CURL_OSX_CALL_COPYPROXIES 1
4747+-# endif
4848+-#endif
4949+-
5050+ #ifdef USE_LWIPSOCK
5151+ # include <lwip/init.h>
5252+ # include <lwip/sockets.h>