[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 85/151: configure: enable IPv6 support without `getaddrinfo`
From: |
gnunet |
Subject: |
[gnurl] 85/151: configure: enable IPv6 support without `getaddrinfo` |
Date: |
Fri, 20 Dec 2019 14:26:34 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 226bf217028017e408eadef66e60a1ea5762c961
Author: Marcel Raad <address@hidden>
AuthorDate: Sat Nov 30 15:49:32 2019 +0100
configure: enable IPv6 support without `getaddrinfo`
This makes it possible to recognize and connect to literal IPv6
addresses when `getaddrinfo` is not available, which is already the
case for the CMake build. This affects e.g. classic MinGW because it
still targets Windows 2000 by default, where `getaddrinfo` is not
available, but general IPv6 support is.
Instead of checking for `getaddrinfo`, check for `sockaddr_in6` as the
CMake build does.
Closes https://github.com/curl/curl/pull/4662
---
configure.ac | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1b5a7fb4a..3e156bcae 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1203,16 +1203,23 @@ AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
;;
esac ],
- AC_TRY_RUN([ /* is AF_INET6 available? */
+ AC_TRY_RUN([ /* are AF_INET6 and sockaddr_in6 available? */
#include <sys/types.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
+#include <ws2tcpip.h>
#else
#include <sys/socket.h>
+#include <netinet/in.h>
+#if defined (__TANDEM)
+# include <netinet/in6.h>
+#endif
#endif
#include <stdlib.h> /* for exit() */
main()
{
+ struct sockaddr_in6 s;
+ (void)s;
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
@@ -1227,8 +1234,12 @@ main()
ipv6=yes
))
-# Check if struct sockaddr_in6 have sin6_scope_id member
if test "$ipv6" = yes; then
+ curl_ipv6_msg="enabled"
+ AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
+ IPV6_ENABLED=1
+ AC_SUBST(IPV6_ENABLED)
+
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
AC_TRY_COMPILE([
#include <sys/types.h>
@@ -4052,15 +4063,6 @@ AC_CHECK_FUNCS([fnmatch \
fi
])
-if test "$ipv6" = "yes"; then
- if test "$curl_cv_func_getaddrinfo" = "yes"; then
- AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
- IPV6_ENABLED=1
- AC_SUBST(IPV6_ENABLED)
- curl_ipv6_msg="enabled"
- fi
-fi
-
CURL_CHECK_NONBLOCKING_SOCKET
dnl ************************************************************
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 100/151: conncache: fix multi-thread use of shared connection cache, (continued)
- [gnurl] 100/151: conncache: fix multi-thread use of shared connection cache, gnunet, 2019/12/20
- [gnurl] 111/151: vtls: make BearSSL possible to set with CURL_SSL_BACKEND, gnunet, 2019/12/20
- [gnurl] 109/151: travis: remove "coverage", make it "torture", gnunet, 2019/12/20
- [gnurl] 77/151: azure-pipelines: fix the test script, gnunet, 2019/12/20
- [gnurl] 73/151: build: Disable Visual Studio warning "conditional expression is constant", gnunet, 2019/12/20
- [gnurl] 79/151: OPENSOCKETFUNCTION.3: correct the purpose description, gnunet, 2019/12/20
- [gnurl] 84/151: curl_setup: disable IPv6 resolver without `getaddrinfo`, gnunet, 2019/12/20
- [gnurl] 80/151: curl: show better error message when no homedir is found, gnunet, 2019/12/20
- [gnurl] 83/151: github action/azure pipeline: run 'make test-nonflaky' for tests, gnunet, 2019/12/20
- [gnurl] 82/151: openssl: CURLSSLOPT_NO_PARTIALCHAIN can disable partial cert chains, gnunet, 2019/12/20
- [gnurl] 85/151: configure: enable IPv6 support without `getaddrinfo`,
gnunet <=
- [gnurl] 87/151: CURLOPT_VERBOSE.3: see also ERRORBUFFER, gnunet, 2019/12/20
- [gnurl] 98/151: curl: make the etag load logic work without fseek, gnunet, 2019/12/20
- [gnurl] 103/151: winbuild: Define CARES_STATICLIB when WITH_CARES=static, gnunet, 2019/12/20
- [gnurl] 90/151: test342: make it return a 304 as the tag matches, gnunet, 2019/12/20
- [gnurl] 99/151: azure: add a vanilla macos build, gnunet, 2019/12/20
- [gnurl] 105/151: tests: fix permissions of ssh keys in WSL, gnunet, 2019/12/20
- [gnurl] 102/151: conn: always set bits.close with connclose(), gnunet, 2019/12/20
- [gnurl] 116/151: curl: improved cleanup in upload error path, gnunet, 2019/12/20
- [gnurl] 108/151: azure: add libssh2 and cmake macos builds, gnunet, 2019/12/20
- [gnurl] 107/151: curl: use errorf() better, gnunet, 2019/12/20