1 |
commit: 03c66ac305fd6e88a3c23bea9b7c1e678f13587c |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 12 00:08:59 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 12 00:25:30 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03c66ac3 |
7 |
|
8 |
mail-mta/sendmail: fix for glibc-2.30, bug #700108 |
9 |
|
10 |
Patch by John Covici. |
11 |
|
12 |
Reported-by: Hanno Böck |
13 |
Fixed-by: John Covici |
14 |
Closes: https://bugs.gentoo.org/700108 |
15 |
Package-Manager: Portage-2.3.93, Repoman-2.3.20 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
.../files/sendmail-8.15.2-glibc-2.30.patch | 52 ++++++++++++++++++++++ |
19 |
mail-mta/sendmail/sendmail-8.15.2-r2.ebuild | 1 + |
20 |
2 files changed, 53 insertions(+) |
21 |
|
22 |
diff --git a/mail-mta/sendmail/files/sendmail-8.15.2-glibc-2.30.patch b/mail-mta/sendmail/files/sendmail-8.15.2-glibc-2.30.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..03281d1990f |
25 |
--- /dev/null |
26 |
+++ b/mail-mta/sendmail/files/sendmail-8.15.2-glibc-2.30.patch |
27 |
@@ -0,0 +1,52 @@ |
28 |
+https://bugs.gentoo.org/700108 |
29 |
+ |
30 |
+--- sendmail-8.15.2-r1/libmilter/sm_gethost.c.orig 2014-03-04 19:59:45.000000000 -0500 |
31 |
++++ sendmail-8.15.2-r1/libmilter/sm_gethost.c 2019-11-15 09:32:25.812406080 -0500 |
32 |
+@@ -51,18 +51,21 @@ |
33 |
+ { |
34 |
+ bool resv6 = true; |
35 |
+ struct hostent *h; |
36 |
+- |
37 |
++#ifdef RES_USE_INET6 |
38 |
+ if (family == AF_INET6) |
39 |
+ { |
40 |
+ /* From RFC2133, section 6.1 */ |
41 |
+ resv6 = bitset(RES_USE_INET6, _res.options); |
42 |
+ _res.options |= RES_USE_INET6; |
43 |
+ } |
44 |
++#endif |
45 |
+ SM_SET_H_ERRNO(0); |
46 |
+ h = gethostbyname(name); |
47 |
++#ifdef RES_USE_INET6 |
48 |
+ if (family == AF_INET6 && !resv6) |
49 |
+ _res.options &= ~RES_USE_INET6; |
50 |
+ |
51 |
++#endif |
52 |
+ /* the function is supposed to return only the requested family */ |
53 |
+ if (h != NULL && h->h_addrtype != family) |
54 |
+ { |
55 |
+--- sendmail-8.15.2-r2/sendmail/conf.c.orig 2019-11-14 17:36:41.262218822 -0500 |
56 |
++++ sendmail-8.15.2-r2/sendmail/conf.c 2019-11-15 09:57:43.550284580 -0500 |
57 |
+@@ -4243,18 +4243,21 @@ |
58 |
+ |
59 |
+ # else /* HAS_GETHOSTBYNAME2 */ |
60 |
+ bool resv6 = true; |
61 |
+- |
62 |
++#ifdef RES_USE_INET6 |
63 |
+ if (family == AF_INET6) |
64 |
+ { |
65 |
+ /* From RFC2133, section 6.1 */ |
66 |
+ resv6 = bitset(RES_USE_INET6, _res.options); |
67 |
+ _res.options |= RES_USE_INET6; |
68 |
+ } |
69 |
++#endif |
70 |
+ SM_SET_H_ERRNO(0); |
71 |
+ h = gethostbyname(name); |
72 |
++#ifdef RES_USE_INET6 |
73 |
+ if (!resv6) |
74 |
+ _res.options &= ~RES_USE_INET6; |
75 |
+ |
76 |
++#endif |
77 |
+ /* the function is supposed to return only the requested family */ |
78 |
+ if (h != NULL && h->h_addrtype != family) |
79 |
+ { |
80 |
|
81 |
diff --git a/mail-mta/sendmail/sendmail-8.15.2-r2.ebuild b/mail-mta/sendmail/sendmail-8.15.2-r2.ebuild |
82 |
index d3fd92fa5bb..b8ea4032251 100644 |
83 |
--- a/mail-mta/sendmail/sendmail-8.15.2-r2.ebuild |
84 |
+++ b/mail-mta/sendmail/sendmail-8.15.2-r2.ebuild |
85 |
@@ -59,6 +59,7 @@ src_prepare() { |
86 |
eapply "${FILESDIR}"/libmilter-sharedlib.patch |
87 |
eapply -p0 "${FILESDIR}"/sendmail-starttls-multi-crl.patch |
88 |
eapply "${FILESDIR}"/${P}-openssl-1.1.0-fix.patch |
89 |
+ eapply "${FILESDIR}"/${P}-glibc-2.30.patch |
90 |
|
91 |
local confCC="$(tc-getCC)" |
92 |
local confCCOPTS="${CFLAGS}" |