git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
DSDennis Stosberg <dennis@stosberg.net>
Date
Aug 15, 2006, 09:01 UTC
Message-ID
<20060815090125.5223.70700.stgit@leonov.stosberg.net>
In-Reply-To
<20060815090031.5223.27458.stgit@leonov.stosberg.net>

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>
---
 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().
Previous: Dennis StosbergNext: Dennis Stosberg
Message 4 of 10 in “Configuration tweaks for Solaris”
  1. 0/6 Configuration tweaks for SolarisDennis Stosberg, Aug 15, 2006
  2. 1/6 Solaris has strlcpy() at least since version 8Dennis Stosberg, Aug 15, 2006
  3. 2/6 Solaris does not support C99 format strings before version 10Dennis Stosberg, Aug 15, 2006
  4. 3/6 Look for sockaddr_storage in sys/socket.hDennis Stosberg, Aug 15, 2006
  5. 4/6 Fix detection of ipv6 on SolarisDennis Stosberg, Aug 15, 2006
  6. 5/6 On Solaris nanosleep() is not in libc but in librtDennis Stosberg, Aug 15, 2006
  7. Junio C HamanoAug 15, 2006
  8. Alex RiesenAug 15, 2006
  9. Documentation/technical/racy-git.txtJunio C Hamano, Aug 15, 2006
  10. 6/6 Fix compilation with Sun CCDennis Stosberg, Aug 15, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.