[0.4.9] [NFSD] Apply a hack to avoid CORE-13498

Committing into rls was requested by Pierre.
The hack allows to startup nfsd even when getnameinfo() fails.
This commit is contained in:
Joachim Henze 2018-06-02 13:23:06 +02:00
parent 4268605cb9
commit 39f5e56a29

View file

@ -309,8 +309,17 @@ static int getdomainname()
(socklen_t)ptr->ai_addrlen, hostname, NI_MAXHOST,
servInfo, NI_MAXSERV, NI_NAMEREQD);
if (status)
#if 0
dprintf(1, "getnameinfo failed %d\n", WSAGetLastError());
else {
#else
{
dprintf(1, "getnameinfo failed %d, forcing name\n", WSAGetLastError());
memcpy(hostname, "reactos.home", sizeof("reactos.home"));
status = 0;
}
{
#endif
size_t i, len = strlen(hostname);
char *p = hostname;
dprintf(1, "getdomainname: hostname %s %d\n", hostname, len);