From 3792aa7058caf96e1ed03a1e51792ee706cb0626 Mon Sep 17 00:00:00 2001 From: hniksic Date: Wed, 19 Nov 2003 04:07:42 -0800 Subject: [PATCH] [svn] Don't compile socket_has_inet6 if IPv6 is disabled. --- src/ChangeLog | 5 +++++ src/connect.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6b39e88f..b281c307 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-11-19 Hrvoje Niksic + + * connect.c (socket_has_inet6): Only compile it if IPv6 is enabled + and AI_ADDRCONFIG is missing. + 2003-11-18 Hrvoje Niksic * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak diff --git a/src/connect.c b/src/connect.c index 5557ad39..35e4cfdc 100644 --- a/src/connect.c +++ b/src/connect.c @@ -588,6 +588,9 @@ retryable_socket_connect_error (int err) return 1; } +#ifdef ENABLE_IPV6 +# ifndef HAVE_GETADDRINFO_AI_ADDRCONFIG + /* Return non-zero if the INET6 socket family is supported on the system. @@ -613,6 +616,9 @@ socket_has_inet6 (void) return supported; } +# endif/* not HAVE_GETADDRINFO_AI_ADDRCONFIG */ +#endif /* ENABLE_IPV6 */ + /* Wait for a single descriptor to become available, timing out after MAXTIME seconds. Returns 1 if FD is available, 0 for timeout and -1 for error. The argument WAIT_FOR can be a combination of -- 2.39.2