summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog3
-rw-r--r--src/include/fake-addrinfo.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index db83cc52cd..2e5416c323 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,5 +1,8 @@
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.
diff --git a/src/include/fake-addrinfo.c b/src/include/fake-addrinfo.c
index 58fa7424ba..c73ecf527e 100644
--- a/src/include/fake-addrinfo.c
+++ b/src/include/fake-addrinfo.c
@@ -39,6 +39,13 @@
* 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)
@@ -209,7 +216,7 @@ int getnameinfo (const struct sockaddr *sa, socklen_t len,
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)) /* ??? */