[bedevtalk] Socket netwwork in Bone

Philippe Houdoin philippe.houdoin at free.fr
Thu Mar 9 13:32:02 BRT 2006


Quoting fredrik <fredrik.moden at telia.com>:

> Ok Have tested this but gethostname does not work ether :(

Damned, I forgot that BONE's gethostname() is *not* broken as the R5 one was.
It conforms to POSIX: 0 is return on _success_, not on error like R5's
implementation. Try again after changing the test into this:

if (gethostname(host_name, MAXHOSTNAMELEN) != 0) {
     return -1;
}

- Philippe


More information about the bedevtalk mailing list