Fix Utility::GetFQDN() on OS X

fixes #7495
This commit is contained in:
Gunnar Beutner 2014-10-29 16:54:33 +01:00
parent 319b9b256a
commit ceca27e25b
1 changed files with 2 additions and 6 deletions

View File

@ -1024,18 +1024,14 @@ String Utility::GetFQDN(void)
if (rc != 0)
result = NULL;
String canonicalName;
if (result) {
if (strcmp(result->ai_canonname, "localhost") != 0)
canonicalName = result->ai_canonname;
hostname = result->ai_canonname;
freeaddrinfo(result);
} else {
canonicalName = hostname;
}
return canonicalName;
return hostname;
}
int Utility::Random(void)