Skip to content

Commit ab5573a

Browse files
dstosbergJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f4e14ca commit ab5573a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ AC_SUBST(NO_D_TYPE_IN_DIRENT)
181181
# sockaddr_storage.
182182
AC_CHECK_TYPE(struct sockaddr_storage,
183183
[NO_SOCKADDR_STORAGE=],
184-
[NO_SOCKADDR_STORAGE=YesPlease],
185-
[#include <netinet/in.h>])
184+
[NO_SOCKADDR_STORAGE=YesPlease],[
185+
#include <sys/types.h>
186+
#include <sys/socket.h>
187+
])
186188
AC_SUBST(NO_SOCKADDR_STORAGE)
187189
#
188190
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().

0 commit comments

Comments
 (0)