It just needs LDFLAGS.SunOS += -lnsl -lsocket
It just needs LDFLAGS.SunOS += -lnsl -lsocket