X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3c9700d8d045f3ff26ce5dd2a174454dafc14822..cd5e92564c2b2c1d4c247b97ca27b016afb22976:/mts/sendmail/hosts.c diff --git a/mts/sendmail/hosts.c b/mts/sendmail/hosts.c index 7d1d8085..40697ce9 100644 --- a/mts/sendmail/hosts.c +++ b/mts/sendmail/hosts.c @@ -13,7 +13,7 @@ */ #include -#include +#include #include static struct host { @@ -47,7 +47,7 @@ OfficialName (char *name) if (!strcasecmp (LocalName(), site)) return LocalName(); -#ifndef BIND +#ifdef HAVE_SETHOSTENT sethostent (1); #endif @@ -57,12 +57,13 @@ OfficialName (char *name) } if (hosts.h_name || init_hs ()) { for (h = hosts.h_next; h; h = h->h_next) - if (!strcasecmp (h->h_name, q)) + if (!strcasecmp (h->h_name, q)) { return h->h_name; - else + } else { for (r = h->h_aliases; *r; r++) if (!strcasecmp (*r, q)) return h->h_name; + } } strncpy (buffer, site, sizeof(buffer));