Always use getaddrinfo() for name-to-address lookups; it's the only
portable API that lets you do those lookups in a thread-safe fashion.
This means we require getaddrinfo(); yes, this leaves older OSes out in
the cold - you'd have to provide your own getaddrinfo() on older OSes
that lack it, just as you now will need to provide versions of Flex and
bison/Berkeley YACC that can support reentrant scanners/parsers on older
OSes that lack it, and compilers capable of supporting some C99 features
on older platforms that lack it.
Try to find reentrant versions of getnetbyname() and getprotobyname();
that's a pain, and, if none are found, we'll just have to hope that the
native versions are thread-safe, which they aren't on NetBSD and
OpenBSD.