Issue #138: fixed non-portable HOST_NAME_MAX.

This commit is contained in:
Vincent Richard 2017-05-08 21:53:26 +02:00
parent 8d3ea37b55
commit ea66541338

View File

@ -236,7 +236,7 @@ const vmime::string posixHandler::getHostName() const
}
// Get host name
char hostname[HOST_NAME_MAX];
char hostname[256];
::gethostname(hostname, sizeof(hostname));
hostname[sizeof(hostname) - 1] = '\0';