[Mono-list] [Patch] System.Environment.MachineName

Jaroslaw Kowalski jarek@atm.com.pl
Sat, 14 Dec 2002 14:47:46 +0100

System.Environment.MachineName doesn't work on Linux now (always returns
"null" string).

The fix is simple:

In "mono/metadata/icall.c" in function

"if (gethostname (buf, len) != 0)" to
" if (gethostname (buf, len) == 0)".

(obviously simple a typo).

Manual for gethostname() says it returns 0 on success while code seems to
test the opposite case.
As I don't have CVS access, can you please commit this fix?