[PATCH 3/6] Look for sockaddr_storage in sys/socket.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---

 configure.ac |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e890131..0321d43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,8 +181,10 @@ # Define NO_SOCKADDR_STORAGE if your pla
 # 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().
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]