+2002-06-21 Ezra Peisach <epeisach@bu.edu>
+
+ * fake-addrinfo.h: If IPv6 support is compiled in, but the OS does
+ not provide in6addr_any in libc, provide a static copy.
+
+ * configure.in: If IPv6 support is compiled in, test for existence
+ of in6addr_any in libc.
+
2002-06-21 Ken Raeburn <raeburn@mit.edu>
* port-sockets.h [!_WIN32 && !HAVE_MACSOCK_H]: Include
AC_HEADER_STDARG
KRB5_AC_INET6
dnl
+dnl If compiling with IPv6 support, test if in6addr_any functions.
+dnl Irix 6.5.16 defines it, but lacks support in the C library.
+if test $krb5_cv_inet6 = yes ; then
+AC_CACHE_CHECK([For in6addr_any definition in library],
+ krb5_cv_var_in6addr_any,
+[AC_TRY_LINK([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_MACSOCK_H
+#include <macsock.h>
+#else
+#include <sys/socket.h>
+#endif
+#include <netinet/in.h>
+#include <netdb.h>
+],[
+ struct sockaddr_in6 in;
+ in.sin6_addr = in6addr_any;
+],krb5_cv_var_in6addr_any=yes, krb5_cv_var_in6addr_any=no)])
+ if test $krb5_cv_var_in6addr_any = no; then
+ AC_DEFINE(NEED_INSIXADDR_ANY,1,[Define if in6addr_any is not defined in libc])
+ fi
+fi
+
+dnl
+dnl
dnl check for ANSI stdio, esp "b" option to fopen(). This (unfortunately)
dnl requires a run check...
dnl
#endif /* WRAP_GETADDRINFO || WRAP_GETNAMEINFO */
+#if defined(KRB5_USE_INET6) && defined(NEED_INSIXADDR_ANY)
+/* If compiling with IPv6 support and C library does not define in6addr_any */
+static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+#endif
+
#ifdef ADDRINFO_UNDEF_INLINE
# undef inline
# undef ADDRINFO_UNDEF_INLINE