You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ben Collins-Sussman <su...@newton.collab.net> on 2000/12/14 17:29:05 UTC

sockaddr.c problem

After a CVS update and a clean build, I can't compile network_io on
either of my boxes (FreeBSD 4.0 and 4.1).  I know there's been quite a
bit of churn in sockaddr.c.  :)


gcc -g -O2 -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread  -D_REENTRANT -D_THREAD_SAFE  -c -I../../include -I../../include/arch/unix -I../../include/arch/unix sockaddr.c
In file included from sockaddr.c:79:
../unix/sa_common.c: In function `apr_get_ipaddr':
../unix/sa_common.c:122: warning: dereferencing `void *' pointer
../unix/sa_common.c:122: request for member `__u6_addr' in something not a structure or union
../unix/sa_common.c:122: warning: dereferencing `void *' pointer
../unix/sa_common.c:122: request for member `__u6_addr' in something not a structure or union
../unix/sa_common.c:122: warning: dereferencing `void *' pointer
../unix/sa_common.c:122: request for member `__u6_addr' in something not a structure or union
gmake[3]: *** [sockaddr.o] Error 1

Re: sockaddr.c problem

Posted by Ben Collins-Sussman <su...@newton.collab.net>.
The patch works great.  Just committed it, if that's ok.  :)

Jeff Trawick <tr...@bellsouth.net> writes:

> Ben Collins-Sussman <su...@newton.collab.net> writes:
> 
> > After a CVS update and a clean build, I can't compile network_io on
> > either of my boxes (FreeBSD 4.0 and 4.1).  I know there's been quite a
> > bit of churn in sockaddr.c.  :)
> 
> Cool^H^H^H^HSorry!
> 
> Please try this patch and let me know how it goes...
> 
> Index: network_io/unix/sa_common.c
> ===================================================================
> RCS file: /home/cvspublic/apr/network_io/unix/sa_common.c,v
> retrieving revision 1.20
> diff -u -r1.20 sa_common.c
> --- network_io/unix/sa_common.c	2000/12/14 16:04:08	1.20
> +++ network_io/unix/sa_common.c	2000/12/14 18:15:23
> @@ -119,7 +119,7 @@
>                    sockaddr->addr_str_len);
>  #if APR_HAVE_IPV6
>      if (sockaddr->sa.sin.sin_family == AF_INET6 &&
> -        IN6_IS_ADDR_V4MAPPED(sockaddr->ipaddr_ptr)) {
> +        IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sockaddr->ipaddr_ptr)) {
>          /* This is an IPv4-mapped IPv6 address; drop the leading
>           * part of the address string so we're left with the familiar
>           * IPv4 format.
> 
> 
> -- 
> Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...

Re: sockaddr.c problem

Posted by Jeff Trawick <tr...@bellsouth.net>.
Ben Collins-Sussman <su...@newton.collab.net> writes:

> After a CVS update and a clean build, I can't compile network_io on
> either of my boxes (FreeBSD 4.0 and 4.1).  I know there's been quite a
> bit of churn in sockaddr.c.  :)

Cool^H^H^H^HSorry!

Please try this patch and let me know how it goes...

Index: network_io/unix/sa_common.c
===================================================================
RCS file: /home/cvspublic/apr/network_io/unix/sa_common.c,v
retrieving revision 1.20
diff -u -r1.20 sa_common.c
--- network_io/unix/sa_common.c	2000/12/14 16:04:08	1.20
+++ network_io/unix/sa_common.c	2000/12/14 18:15:23
@@ -119,7 +119,7 @@
                   sockaddr->addr_str_len);
 #if APR_HAVE_IPV6
     if (sockaddr->sa.sin.sin_family == AF_INET6 &&
-        IN6_IS_ADDR_V4MAPPED(sockaddr->ipaddr_ptr)) {
+        IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sockaddr->ipaddr_ptr)) {
         /* This is an IPv4-mapped IPv6 address; drop the leading
          * part of the address string so we're left with the familiar
          * IPv4 format.


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