fetchmail/fetchmail-6.2.5-addrconf.patch

18 lines
691 B
Diff
Raw Normal View History

Use AI_ADDRCONFIG for name lookups by default. Don't send this upstream
as-is since it needs an autoconf test to check whether AI_ADDRCONFIG is safe
to use in getaddrinfo calls (it isn't in the RHL6.2 resolver, for instance).
--- fetchmail-6.2.5/socket.c.addrconf 2003-10-10 11:32:15.000000000 +0100
+++ fetchmail-6.2.5/socket.c 2004-05-19 13:23:22.000000000 +0100
@@ -276,6 +276,9 @@
#endif /* HAVE_SOCKETPAIR */
memset(&req, 0, sizeof(struct addrinfo));
req.ai_socktype = SOCK_STREAM;
+#ifdef AI_ADDRCONFIG
+ req.ai_flags = AI_ADDRCONFIG;
+#endif
if (getaddrinfo(host, service, &req, &ai0)) {
report(stderr, GT_("fetchmail: getaddrinfo(%s.%s)\n"), host,service);