From b68a5a787ec738dbb4e1bbe51fc150daa0064ac8 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 1 Jul 1997 16:39:47 +0000 Subject: Don't link ETRN support unless we can use gethostbyname. svn path=/trunk/; revision=1131 --- fetchmail.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index 1466a2cc..28b82e96 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -750,7 +750,9 @@ static char *showproto(int proto) case P_IMAP_K4: return("IMAP-K4"); break; case P_APOP: return("APOP"); break; case P_RPOP: return("RPOP"); break; +#ifdef HAVE_GETHOSTBYNAME case P_ETRN: return("ETRN"); break; +#endif /* HAVE_GETHOSTBYNAME */ default: return("unknown?!?"); break; } } @@ -819,7 +821,12 @@ static int query_host(struct query *ctl) return(doIMAP(ctl)); break; case P_ETRN: +#ifdef HAVE_GETHOSTBYNAME return(doETRN(ctl)); +#else + fprintf(stderr, "Cannot support ETRN without gethostbyname(2).\n"); + return(PS_PROTOCOL); +#endif /* HAVE_GETHOSTBYNAME */ default: error(0, 0, "unsupported protocol selected."); return(PS_PROTOCOL); -- cgit v1.2.3