Thread (3 messages) 3 messages, 2 authors, 2020-02-14

Fix inet_ntop and inet_pton on Solaris

From: Jeffrey Walton <hidden>
Date: 2020-02-03 15:23:00

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

Jeff

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help