Look for sockaddr_storage in sys/socket.h

On Solaris and the BSDs the definition of "struct sockaddr_storage"
is not available from "netinet/in.h".  On Solaris "sys/socket.h" is
enough, at least OpenBSD needs "sys/types.h", too.

Using "sys/types.h" and "sys/socket.h" seems to be a more portable
way.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Dennis Stosberg 2006-08-15 11:01:25 +02:00 committed by Junio C Hamano
parent f4e14ca9e0
commit ab5573ae9f

View File

@ -181,8 +181,10 @@ AC_SUBST(NO_D_TYPE_IN_DIRENT)
# sockaddr_storage. # sockaddr_storage.
AC_CHECK_TYPE(struct sockaddr_storage, AC_CHECK_TYPE(struct sockaddr_storage,
[NO_SOCKADDR_STORAGE=], [NO_SOCKADDR_STORAGE=],
[NO_SOCKADDR_STORAGE=YesPlease], [NO_SOCKADDR_STORAGE=YesPlease],[
[#include <netinet/in.h>]) #include <sys/types.h>
#include <sys/socket.h>
])
AC_SUBST(NO_SOCKADDR_STORAGE) AC_SUBST(NO_SOCKADDR_STORAGE)
# #
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().