add --without-ipv6
make sure we have `in6addr_any' which we use in the code. This test avoids false positives on OpenBSD git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7659 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -3,6 +3,11 @@ dnl
|
|||||||
dnl test for IPv6
|
dnl test for IPv6
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN(AC_KRB_IPV6, [
|
AC_DEFUN(AC_KRB_IPV6, [
|
||||||
|
AC_ARG_WITH(ipv6,
|
||||||
|
[ --without-ipv6 do not enable IPv6 support],[
|
||||||
|
if test "$withval" = "no"; then
|
||||||
|
ac_cv_lib_ipv6=no
|
||||||
|
fi])
|
||||||
AC_CACHE_CHECK(for IPv6,ac_cv_lib_ipv6,
|
AC_CACHE_CHECK(for IPv6,ac_cv_lib_ipv6,
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
@@ -19,13 +24,6 @@ AC_TRY_COMPILE([
|
|||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
#if defined(IN6ADDR_ANY_INIT)
|
|
||||||
struct in6_addr any = IN6ADDR_ANY_INIT;
|
|
||||||
#elif defined(IPV6ADDR_ANY_INIT)
|
|
||||||
struct in6_addr any = IPV6ADDR_ANY_INIT;
|
|
||||||
#else
|
|
||||||
#error no any?
|
|
||||||
#endif
|
|
||||||
struct sockaddr_in6 sin6;
|
struct sockaddr_in6 sin6;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
@@ -33,7 +31,7 @@ struct in6_addr any = IPV6ADDR_ANY_INIT;
|
|||||||
|
|
||||||
sin6.sin6_family = AF_INET6;
|
sin6.sin6_family = AF_INET6;
|
||||||
sin6.sin6_port = htons(17);
|
sin6.sin6_port = htons(17);
|
||||||
sin6.sin6_addr = any;
|
sin6.sin6_addr = in6addr_any;
|
||||||
bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
|
bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
|
||||||
],
|
],
|
||||||
ac_cv_lib_ipv6=yes,
|
ac_cv_lib_ipv6=yes,
|
||||||
|
Reference in New Issue
Block a user