You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/07/21 18:56:37 UTC

[PATCH] Use getaddrinfo even if IPv6 isn't supported

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;


Re: [PATCH] Use getaddrinfo even if IPv6 isn't supported

Posted by Jeff Trawick <tr...@attglobal.net>.
go ahead and commit...  I don't know of such a system either...

if it breaks somewhere for some reason that probably means that we
should tighten up our checks for which getaddrinfo() implementations
we are willing to use

Justin Erenkrantz <je...@ebuilt.com> writes:

> 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;
> 

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...