diff options
author | Ezra Peisach <epeisach@mit.edu> | 2002-06-21 19:21:44 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2002-06-21 19:21:44 +0000 |
commit | de47c2253dfc39f5a2e26b64a47afb538f602a13 (patch) | |
tree | ddc67f218a5e29baf7d2cb8df82a4fd0ec63b184 /src/include | |
parent | ef9da5a7006d3c86efdde216b46bc42bf67cd3c0 (diff) | |
download | krb5-de47c2253dfc39f5a2e26b64a47afb538f602a13.tar.gz krb5-de47c2253dfc39f5a2e26b64a47afb538f602a13.tar.xz krb5-de47c2253dfc39f5a2e26b64a47afb538f602a13.zip |
* 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.
Irix 6.5.16 declares it, and some libraries appear to depend on it, but
it is not defined in any libraries that I could find.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14555 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ChangeLog | 8 | ||||
-rw-r--r-- | src/include/configure.in | 27 | ||||
-rw-r--r-- | src/include/fake-addrinfo.h | 5 |
3 files changed, 40 insertions, 0 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 88770e313..9a5e5639a 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,11 @@ +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 diff --git a/src/include/configure.in b/src/include/configure.in index 56f5baea1..a702a2acc 100644 --- a/src/include/configure.in +++ b/src/include/configure.in @@ -74,6 +74,33 @@ AC_CHECK_HEADERS(stdlib.h string.h stddef.h unistd.h sys/types.h sys/file.h sys/ 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 diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 5003becd2..8a937c192 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -893,6 +893,11 @@ int getnameinfo (const struct sockaddr *sa, socklen_t len, #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 |