+2002-02-19 Ken Raeburn <raeburn@mit.edu>
+
+ * fake-addrinfo.c (_XOPEN_SOURCE_EXTENDED): Define if not defined,
+ and if not Mac or Windows, for duration of inclusion of netdb.h.
+ This gets us the h_errno declaration on HP-UX.
+ (getnameinfo): Cast gethostbyaddr pointer arg to char *, not
+ sockaddr *.
+
2002-02-10 Ken Raeburn <raeburn@mit.edu>
* fake-addrinfo.h: Always check for FAI_PREFIX, not just when fake
/*
- * Copyright (C) 2001 by the Massachusetts Institute of Technology,
+ * Copyright (C) 2001,2002 by the Massachusetts Institute of Technology,
* Cambridge, MA, USA. All Rights Reserved.
*
* This software is being provided to you, the LICENSEE, by the
#include "fake-addrinfo.h"
+#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(HAVE_MACSOCK_H) && !defined(_WIN32)
+/* Hack for HPUX, to get h_errno. */
+# define _XOPEN_SOURCE_EXTENDED 1
+# include <netdb.h>
+# undef _XOPEN_SOURCE_EXTENDED
+#endif
+
void fixup_addrinfo (struct addrinfo *ai)
{
struct addrinfo *ai2;
else
return EAI_FAIL; /* ?? */
} else {
- hp = gethostbyaddr ((struct sockaddr *) &sinp->sin_addr, sizeof (struct in_addr),
+ hp = gethostbyaddr ((const char *) &sinp->sin_addr,
+ sizeof (struct in_addr),
sa->sa_family);
if (hp == 0) {
if (h_errno == NO_ADDRESS && !(flags & NI_NAMEREQD)) /* ??? */