- IPv6: Added configure check for in6addr_any to fix Fedora Core 4 compile problem,

reported by wheatie80 ().
This commit is contained in:
Bram Matthys 2005-07-25 21:11:27 +00:00
parent 10458c06b9
commit 3b84610599
5 changed files with 77 additions and 1 deletions

View file

@ -811,3 +811,5 @@
aliasing warnings, so it sounds good to disable this type of optimization for now.
- Fixed problem with crash-on-link if compiled with GCC 4, reported by jonneyboy (#2573)
and PHANTOm (#2590).
- IPv6: Added configure check for in6addr_any to fix Fedora Core 4 compile problem,
reported by wheatie80 (#2594).

View file

@ -121,9 +121,26 @@ if test "$ac_cv_ip6" = "no"; then
AC_MSG_WARN(Your system does not support IPv6 so it will not be enabled)
else
AC_DEFINE(INET6)
have_v6="yes"
AC_MSG_CHECKING([for struct in6addr_any])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#define IN_AUTOCONF
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>]],
[[struct in6_addr a = in6addr_any;]]
)],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_DEFINE(NO_IN6ADDR_ANY)
]
)
fi
LIBS="$save_libs"
])
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(PARAMH))
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(STDLIBH))
AC_CHECK_HEADER(stddef.h,AC_DEFINE(STDDEFH))

54
configure vendored
View file

@ -2641,6 +2641,7 @@ fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -10555,6 +10556,59 @@ cat >>confdefs.h <<\_ACEOF
#define INET6 1
_ACEOF
have_v6="yes"
echo "$as_me:$LINENO: checking for struct in6addr_any" >&5
echo $ECHO_N "checking for struct in6addr_any... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#define IN_AUTOCONF
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
struct in6_addr a = in6addr_any;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
cat >>confdefs.h <<\_ACEOF
#define NO_IN6ADDR_ANY 1
_ACEOF
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
LIBS="$save_libs"

View file

@ -278,3 +278,6 @@
/* Define if you have alloca */
#undef HAVE_ALLOCA
/* Define to 1 if your system has no in6addr_any. */
#undef NO_IN6ADDR_ANY

View file

@ -191,7 +191,7 @@ char mydummy2[MYDUMMY_SIZE];
# endif
# endif
# if defined(linux)
# if defined(linux) && defined(NO_IN6ADDR_ANY)
static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};