This seems to depend on the OpenSolaris version. i added those lines about a year ago, and -lnsl wasn't needed on the Nexenta OpenSolaris i used at the time. i don't remember if it was an error to link against it, though.