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];
+
     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);
     
     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).

-- 
Colm MacCárthaigh                        Public Key: [EMAIL PROTECTED]
[EMAIL PROTECTED]                                         http://www.stdlib.net/

Reply via email to