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

[PATCH 2/4] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
May 28, 2009, 02:17 UTC
Message-ID
<8D9Pn2N3FZLQcyxrPABrG3rdrFXFL1OddmlhE77V4q-K8NSzkS8xbqdJw0C0CnqkCcLEUU_UEIs@cipher.nrlssc.navy.mil>
In-Reply-To
<8D9Pn2N3FZLQcyxrPABrG-rVdsP-X00e6c8oj-YzYQzWI-MvSy5AAzVjbQS0XsK76Ax9XKaLBbU@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>

This library is required on Solaris since hstrerror resides in libresolv. Additionally, on Solaris 7, inet_ntop and inet_pton reside there too.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 Makefile |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index ba78077..32b28ea 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,10 @@ all::
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
 #
+# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.
+# Notably on Solaris hstrerror resides in libresolv and on Solaris 7
+# inet_ntop and inet_pton additionally reside there.
+#
 # Define NO_MMAP if you want to avoid mmap.
 #
 # Define NO_PTHREADS if you do not have or do not want to use Pthreads.
@@ -697,10 +701,10 @@ endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
 	NEEDS_NSL = YesPlease
+	NEEDS_RESOLV = YesPlease
 	SHELL_PATH = /bin/bash
 	NO_STRCASESTR = YesPlease
 	NO_MEMMEM = YesPlease
-	NO_HSTRERROR = YesPlease
 	NO_MKDTEMP = YesPlease
 	OLD_ICONV = UnfortunatelyYes
 	ifeq ($(uname_R),5.8)
@@ -956,6 +960,9 @@ endif
 ifdef NEEDS_NSL
 	EXTLIBS += -lnsl
 endif
+ifdef NEEDS_RESOLV
+	EXTLIBS += -lresolv
+endif
 ifdef NO_D_TYPE_IN_DIRENT
 	BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT
 endif
-- 
1.6.3.1.24.g152f4
Previous: Brandon CaseyNext: Brandon Casey
Message 2 of 10 in “Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall”
  1. 1/4 Makefile: use /usr/ucb/install on SunOS platforms rather than ginstallBrandon Casey, May 28, 2009
  2. 2/4 Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile argumentsBrandon Casey, May 28, 2009
  3. 3/4 Makefile: add section for SunOS 5.7Brandon Casey, May 28, 2009
  4. 4/4 Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATHBrandon Casey, May 28, 2009
  5. Jeff KingMay 28, 2009
  6. Junio C HamanoMay 29, 2009
  7. Jeff KingMay 28, 2009
  8. Brandon CaseyMay 28, 2009
  9. Jeff KingMay 28, 2009
  10. Jeff KingMay 28, 2009

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.