apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: cvs commit: apr configure.in CHANGES
Date Mon, 25 Aug 2003 17:54:19 GMT
Colm MacCarthaigh wrote:
> On Mon, Aug 25, 2003 at 12:59:42PM -0400, Jeff Trawick wrote:
> 
>>So what do you get on your system?  I must be missing some OS X fix... 
>>(But this box is running straight Jaguar with all available updates from 
>>Software Update installed.)
> 
> 
> This is what my darwin-using friends have been telling me aswell. Can
> you try:
> 
> --- gni_mapped.c	Sat Feb 15 00:18:30 2003
> +++ gni_mapped2.c	Mon Aug 25 17:40:15 2003
> @@ -37,8 +37,10 @@
>      rc = getnameinfo((struct sockaddr *)&sin, sizeof sin, hostbuf, sizeof hostbuf,
NULL, 0, 0);
>      printf("look up via IPv4: %d/%s\n", rc, hostbuf);
>      
> +    sin.sin_addr.s_addr = sin6.sin6_addr.s6_addr32[3];

the presence of this line doesn't make any difference on my box

compiling with -DKERNEL picks up the s6_addr32 macro on Jaguar

> +
>      strcpy(hostbuf, "not found");
> -    rc = getnameinfo((struct sockaddr *)&sin6, sizeof sin6, hostbuf, sizeof hostbuf,
NULL, 0, NI_NAMEREQD);
> +    rc = getnameinfo((struct sockaddr *)&sin, sizeof sin, hostbuf, sizeof hostbuf,
NULL, 0, 0);
>      printf("look up via IPv6: %d/%s\n", rc, hostbuf);

without the NI_NAMEREQD flag, with our without the line you added 
previously, I get

look up via IPv6: 0/::ffff:812a:1263

>      
>      return 0;
> 
> 
> Where .s6_addr32 is the appropriate member of sin6_addr on darwin,
> for BSDs it should be:
> 
> sin6.sin6_addr.__u6_addr.__u6_addr32[3];
> 
> That will tell if the patch would fix thigns (which it does for my
> friends).

which patch are we talking about?


Mime
View raw message