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>
Dennis Stosberg committed
Aug 15, 2006 at 11:01 UTC
ab5573ae9f4178a7b6f6920f04c73a65feb3c690
1 file changed
+4
-2
configure.ac
+4
-2
@@ -181,8 +181,10 @@ AC_SUBST(NO_D_TYPE_IN_DIRENT)
181
# sockaddr_storage.
182
AC_CHECK_TYPE(struct sockaddr_storage,
183
[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
+])
188
AC_SUBST(NO_SOCKADDR_STORAGE)
189
#
190
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().