aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-07-01 16:39:47 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-07-01 16:39:47 +0000
commitb68a5a787ec738dbb4e1bbe51fc150daa0064ac8 (patch)
tree2e227924675b1b32e0d0c3c8fbe29b91508adb39 /fetchmail.c
parentd5aa82aa53596e5f05628823cfe66ca8fda749cf (diff)
downloadfetchmail-b68a5a787ec738dbb4e1bbe51fc150daa0064ac8.tar.gz
fetchmail-b68a5a787ec738dbb4e1bbe51fc150daa0064ac8.tar.bz2
fetchmail-b68a5a787ec738dbb4e1bbe51fc150daa0064ac8.zip
Don't link ETRN support unless we can use gethostbyname.
svn path=/trunk/; revision=1131
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c7
1 files changed, 7 insertions, 0 deletions
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);