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 4a18265c1de..e7a508beb12 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);