Re: Fix inet_ntop and inet_pton on Solaris
- From
- Jeffrey 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