On Mon, Feb 3, 2020 at 10:22 AM Jeffrey Walton <noloader@xxxxxxxxx> wrote: > > 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