Bug#1741: getservbyport doesn't work
This is a usage error, correct usage is:
const struct servent *se = getservbyport( htons(23), "tcp" );
Your non-portable code runs on sparc, rs6000 and other big-endian
machines.
The getservent(3) manpage doesn't mention that the PORT argument must be
in network byte order, although it says so for the structure member.
I'm reassigning this bug to manpages.
Siggy
--
mailto:bsb@uni-muenster.de // programmer/admin for hire
bsb@beck.westfalen.de \\ Opinions are strictly my own,
voice: +49-251-8619-99 \\ everything else is GPLed
http://www.westfalen.de/private/beck/
Reply to: