]> git.pld-linux.org Git - packages/evolution.git/blame - evolution-addrconfig.patch
- BR: which, gcc-g77
[packages/evolution.git] / evolution-addrconfig.patch
CommitLineData
70c436d2 12003-10-16 Jeremy Katz <katzj@redhat.com>
2
3 * e-host-utils.c (e_gethostbyname_r): use AI_ADDRCONFIG if
4 available to avoid returning IPv6 addresses to hosts without an
5 IPv6 interface.
6
7Index: e-util//e-host-utils.c
8===================================================================
9RCS file: /cvs/gnome/evolution/e-util/e-host-utils.c,v
10retrieving revision 1.14.4.2
11diff -u -u -r1.14.4.2 e-host-utils.c
12--- e-util//e-host-utils.c 8 Oct 2003 20:36:22 -0000 1.14.4.2
13+++ e-util//e-host-utils.c 17 Oct 2003 19:38:08 -0000
14@@ -187,10 +187,21 @@
15 hints.ai_family = PF_UNSPEC;
16 hints.ai_socktype = 0;
17 hints.ai_protocol = 0;
18-
19+
20+#ifdef AI_ADDRCONFIG
21+ hints.ai_flags |= AI_ADDRCONFIG;
22+#endif
23+
24 if ((retval = getaddrinfo (name, NULL, &hints, &res)) != 0) {
25- *herr = ai_to_herr (retval);
26- return -1;
27+#ifdef AI_ADDRCONFIG
28+ hints.ai_flags &= ~AI_ADDRCONFIG;
29+ if ((retval != EAI_BADFLAGS) || (retval = getaddrinfo (name, NULL, &hints, &res)) != 0) {
30+#endif
31+ *herr = ai_to_herr (retval);
32+ return -1;
33+#ifdef AI_ADDRCONFIG
34+ }
35+#endif
36 }
37
38 len = ALIGN (strlen (res->ai_canonname) + 1);
This page took 0.074664 seconds and 4 git commands to generate.