diff -Nur syslog-ng-1.6.7+20050518/src/sources.c syslog-ng-1.6.7+20050518-fqdn/src/sources.c --- syslog-ng-1.6.7+20050518/src/sources.c 2005-02-03 12:08:11.000000000 +0100 +++ syslog-ng-1.6.7+20050518-fqdn/src/sources.c 2005-05-18 19:45:22.684468737 +0200 @@ -229,6 +229,13 @@ if (usefqdn) { gethostname(buf, sizeof(buf) - 1); buf[127] = 0; + // Check if hostname includes a . else do a fqdn lookup + if (NULL == strchr(buf, '.')) { + struct hostent *result = gethostbyname(buf); + if (result) { + strncpy(buf, result->h_name, sizeof(buf) - 1); + } + } } else { getshorthostname(buf, sizeof(buf));