From: Jinoh Kang jinoh.kang.kr@gmail.com
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- programs/wineboot/wineboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index b82c5ec6524..4de20705224 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -826,7 +826,9 @@ static void create_computer_name_keys(void)
if (gethostname( buffer, sizeof(buffer) )) return; hints.ai_flags = AI_CANONNAME; - if (!getaddrinfo( buffer, NULL, &hints, &res )) name = res->ai_canonname; + if (!getaddrinfo( buffer, NULL, &hints, &res ) && + res->ai_canonname && strcasecmp(res->ai_canonname, "localhost") != 0) + name = res->ai_canonname; dot = strchr( name, '.' ); if (dot) *dot++ = 0; else dot = name + strlen(name);