diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Network.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/Network.c b/src/util/Network.c index 3cf3ed51..27c3b43c 100644 --- a/src/util/Network.c +++ b/src/util/Network.c @@ -81,15 +81,17 @@ void Util_GetHostName (char *name, int length) if (! strchr (name, '.')) { #ifdef HAVE_GETHOSTBYNAME - struct hostent *thishostent; - + struct hostent *thishostent=0; +#ifndef CRAY_XT thishostent = gethostbyname (name); +#endif if (thishostent) { strncpy (name, thishostent->h_name, length); name[length - 1] = 0; } + else name[0]='\0'; #endif } } |