Modern Linux provides inet_ntop in -lsocket. Modern OS X provides inet_ntop in -lc. Modern Solaris provides inet_ntop in -lsocket -lnsl. Older Solaris provides inet_ntop in -lresolv.
Ditto for inet_pton.
Tested OK on Ubuntu 18.04, OS X 10.9, OS X 10.5, and Solaris 11.3.
Modern Linux provides inet_ntop in
-lsocket
. Modern OS X provides inet_ntop in-lc
. Modern Solaris provides inet_ntop in-lsocket -lnsl
. Older Solaris provides inet_ntop in-lresolv
.Ditto for inet_pton.
Tested OK on Ubuntu 18.04, OS X 10.9, OS X 10.5, and Solaris 11.3.