summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 20d60400dcb..27e90349cb6 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2433,7 +2433,9 @@ init_system_name ()
/* We still don't have a fully qualified domain name.
Try to find one in the list of alternate names */
char **alias = hp->h_aliases;
- while (*alias && !index (*alias, '.'))
+ while (*alias
+ && (!index (*alias, '.')
+ || !strcmp (*alias, "localhost.localdomain")))
alias++;
if (*alias)
fqdn = *alias;