1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-09 19:00:27 +02:00

Include <sys/types.h> before <netinet/in.h> when checking vor IPv6.

This is for NetBSD 1.5.  Thanks to Greg Troxel!
This commit is contained in:
Marius Vollmer 2002-05-06 19:11:00 +00:00
parent af13462da7
commit 4ea016761a

View file

@ -349,7 +349,11 @@ fi
AC_MSG_CHECKING(for working IPv6 support) AC_MSG_CHECKING(for working IPv6 support)
AC_CACHE_VAL(guile_cv_have_ipv6, AC_CACHE_VAL(guile_cv_have_ipv6,
[AC_TRY_COMPILE([#include <netinet/in.h> [AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <netinet/in.h>
#include <sys/socket.h>], #include <sys/socket.h>],
[struct sockaddr_in6 a; a.sin6_family = AF_INET6;], [struct sockaddr_in6 a; a.sin6_family = AF_INET6;],
guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)]) guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)])
@ -361,7 +365,11 @@ fi
# included in rfc2553 but not in older implementations, e.g., glibc 2.1.3. # included in rfc2553 but not in older implementations, e.g., glibc 2.1.3.
AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id) AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id)
AC_CACHE_VAL(guile_cv_have_sin6_scope_id, AC_CACHE_VAL(guile_cv_have_sin6_scope_id,
[AC_TRY_COMPILE([#include <netinet/in.h>], [AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <netinet/in.h>],
[struct sockaddr_in6 sok; sok.sin6_scope_id = 0;], [struct sockaddr_in6 sok; sok.sin6_scope_id = 0;],
guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)]) guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)])
AC_MSG_RESULT($guile_cv_have_sin6_scope_id) AC_MSG_RESULT($guile_cv_have_sin6_scope_id)