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

Re: Fix inet_ntop and inet_pton on Solaris

From
JWJeffrey Walton <noloader@gmail.com>
Date
Feb 4, 2020, 00:00 UTC
Message-ID
<CAH8yC8njDV9t+qF=EwFftVW5OkwKzaDMR-7ZGOBnqPbdt1R95A@mail.gmail.com>
In-Reply-To
<CAH8yC8kaWXbN+RYMJnM9em7KKW54+N07JtyS1MZk0qppD=m2BA@mail.gmail.com>
On Mon, Feb 3, 2020 at 10:22 AM Jeffrey Walton <noloader@gmail.com> wrote:
Show 31 quoted lines
>
> Hi Everyone,
>
> inet_ntop and inet_pton were not being detected properly on modern on
> Solaris. This patch revisits the the socket gear configuration on
> SunOS and brings it up to date for Solaris 11.
>
> According to configure.ac, the three or four functions of interest
> include hstrerror, inet_ntop and inet_pton. The libraries of interest
> are -lresolv -lsocket -lnsl. The configure tests now look for
> inet_ntop and inet_pton in -lsocket -lnsl per the man page. If not
> found, the configure tests fall back to existing behavior by searching
> in -lresolv. And if not found in -lresolv, then NO_INET_NTOP and
> NO_INET_PTON are set.
>
> Here's the configure fly-by:
>
> checking for socket... no
> checking for library containing socket... no
> checking for inet_ntop... no
> checking for library containing inet_ntop... -lnsl
> checking for inet_pton... yes
> checking for hstrerror... no
> checking for library containing hstrerror... -lresolv
>
> And config.status:
>
> $ /usr/gnu/bin/grep -E 'RESOLV|SOCKET|NSL' config.status
> NEEDS_RESOLV=YesPlease
> NEEDS_SOCKET=YesPlease
> NEEDS_NSL=YesPlease

The patch tested good on Linux (Ubuntu 18.04), Solaris 11 (SunOS 5.11) and Darwin (OS X 10.9).

It is the same patch used for Git Master maint branch and Git 2.25.0 release tarball.

Jeff
Previous: Jeffrey WaltonNext: Jeff King
Message 2 of 3 in “Fix inet_ntop and inet_pton on Solaris”
  1. Jeffrey WaltonFeb 3, 2020
  2. Jeffrey WaltonFeb 4, 2020
  3. Jeff KingFeb 14, 2020

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.