This is the result of a long-standing problem with SunOS and the fact that stock SunOS systems do not ship with DNS resolver code in libc.
Christopher Davis writes:
That’s correct [The SunOS 4.1.3 precompiled binaries don’t do name lookup]. Since Sun figured that everyone used NIS to do name lookups (that DNS thing was apparently only a passing fad, right?), the stock SunOS 4.x systems don’t have DNS-based name lookups in libc.
This is also why Netscape ships two binaries for SunOS 4.1.x.
The best solution is to compile it yourself; the configure script will check to see if you’ve put DNS in the shared libc and will then proceed to link against the DNS resolver library code.