apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH] Use getaddrinfo even if IPv6 isn't supported
Date Sat, 21 Jul 2001 16:56:37 GMT
I looked through the getaddrinfo path and it seems that it doesn't
really rely on IPv6.

If anyone knows of a platform that has getaddrinfo() and doesn't have
IPv6, can you try this patch?  Let me know if it doesn't work.

None of the platforms I have access to has getaddrinfo() and not
IPv6.  I don't want to commit something blindly without testing it
(or receiving feedback).  -- justin

Index: network_io/unix/sa_common.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
retrieving revision 1.35
diff -u -r1.35 sa_common.c
--- network_io/unix/sa_common.c	2001/07/21 06:41:09	1.35
+++ network_io/unix/sa_common.c	2001/07/21 16:43:08
@@ -300,7 +300,7 @@
     return APR_SUCCESS;
 }
 
-#if defined(HAVE_GETADDRINFO) && APR_HAVE_IPV6
+#if defined(HAVE_GETADDRINFO)
 static void save_addrinfo(apr_pool_t *p, apr_sockaddr_t *sa, 
                           struct addrinfo *ai, apr_port_t port)
 {
@@ -333,7 +333,7 @@
         return APR_ENOMEM;
     (*sa)->hostname = apr_pstrdup(p, hostname);
 
-#if defined(HAVE_GETADDRINFO) && APR_HAVE_IPV6
+#if defined(HAVE_GETADDRINFO)
     if (hostname != NULL) {
         struct addrinfo hints, *ai;
         apr_sockaddr_t *cursa;


Mime
View raw message