Two major changes from SunOS 4 hold true for SunOS 5 releases. The binary compatibility package allows SunOS 4-based dynamically linked socket applications to run on SunOS 5.
You must explicitly specify the socket library (-lsocket or libsocket) on the compilation line.
You may need to link with libnsl as well (use -lsocket -lnsl, not -lnsl -lsocket).
You must recompile all SunOS 4 socket-based applications with the socket library to run under SunOS 5.