From feef329eb45e31f997e78fce7c07c3d65a23f353 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Fri, 27 Aug 2004 01:09:48 +0000 Subject: [PATCH] (AC_CHECK_MEMBERS): Add struct sockaddr.sin_len and struct sockaddr_in6.sin6_len. Reported by Michael Tuexen. --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.in b/configure.in index 3b369187a..0c7568e8f 100644 --- a/configure.in +++ b/configure.in @@ -692,6 +692,15 @@ AC_CHECK_FUNCS(sethostent gethostent endhostent dnl inet_lnaof inet_makeaddr inet_netof hstrerror dnl inet_pton inet_ntop) +# struct sockaddr field sin_len is only present on BSD systems. +# On 4.4BSD apparently a #define SIN_LEN exists, but on other BSD systems +# (eg. FreeBSD 4.9) it doesn't and we must use this configure check +AC_CHECK_MEMBERS([struct sockaddr.sin_len],,, +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include ]) + AC_MSG_CHECKING(for __libc_stack_end) AC_CACHE_VAL(guile_cv_have_libc_stack_end, [AC_TRY_LINK([#include @@ -767,6 +776,13 @@ if test $guile_cv_have_sin6_scope_id = yes; then [Define this if your IPv6 has sin6_scope_id in sockaddr_in6 struct.]) fi +# struct sockaddr_in6 field sin_len is only present on BSD systems +AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_len],,, +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include ]) + AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(guile_cv_localtime_cache, [if test x$ac_cv_func_tzset = xyes; then