2001-08-30 Ken Raeburn <raeburn@mit.edu>
+ * fake-addrinfo.c (getnameinfo): Cast address argument to
+ gethostbyaddr.
+
* fake-addrinfo.h (AI_V4MAPPED, AI_ADDRCONFIG, AI_ALL,
AI_DEFAULT): Define as bogus values, since they're part of
getipnodeby* API, not getaddrinfo API.
* fashion that it might be confused with the original M.I.T. software.
*/
+/* To do, maybe:
+
+ IPv6 support for systems with working inet6 socket code but broken
+ getaddrinfo implementations? (RH Linux 6.1 libc getaddrinfo
+ ignores AI_NUMERICHOST. Solaris 8 doesn't appear to support
+ IPv6.) Could use gethostbyname2 if available. */
+
#include "fake-addrinfo.h"
#if !defined (HAVE_GETADDRINFO) || defined (BROKEN_GETADDRINFO)
else
return EAI_FAIL; /* ?? */
} else {
- hp = gethostbyaddr (&sinp->sin_addr, sizeof (struct in_addr),
+ hp = gethostbyaddr ((struct sockaddr *) &sinp->sin_addr, sizeof (struct in_addr),
sa->sa_family);
if (hp == 0) {
if (h_errno == NO_ADDRESS && !(flags & NI_NAMEREQD)) /* ??? */