Re: [PATCH] Add a local implementation of hstrerror for the system which do not have it
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Jun 18, 2007, 21:34 UTC
- Message-ID
- <4676FA59.5040602@nrlssc.navy.mil>
- In-Reply-To
- <4676F8EA.1030305@nrlssc.navy.mil>
Brandon Casey wrote:
Show 11 quoted lines
> Alex Riesen wrote: >> The function converts the value of h_errno (last error of name >> resolver library, see netdb.h). One of systems which supposedly do >> not have the function is SunOS. POSIX does not mandate its presence. > > I saw a comment on another mailing list that hstrerror() is in the > resolv library. > > So adding -lresolv should do it. > > A quick compile works for my test program.
Here's a SunOS5.9 man page for hstrerror:
http://bama.ua.edu/cgi-bin/man-cgi?hstrerror+3RESOLV
which shows:
cc [ flag ... ] file ... -lresolv -lsocket -lnsl [ library ... ]
-brandon