Browse Source

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>
maint
Dennis Stosberg 19 years ago committed by Junio C Hamano
parent
commit
ab5573ae9f
  1. 6
      configure.ac

6
configure.ac

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

Loading…
Cancel
Save