!3 fix build error because of glibc new version
Merge pull request !3 from eaglegai/master
This commit is contained in:
commit
7528434080
57
sendmail-glibc-2.30.patch
Normal file
57
sendmail-glibc-2.30.patch
Normal file
@ -0,0 +1,57 @@
|
||||
The former deprecated macro RES_USE_INET6 is gone with glibc 2.30
|
||||
|
||||
---
|
||||
libmilter/sm_gethost.c | 6 ++++--
|
||||
sendmail/conf.c | 6 ++++--
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/libmilter/sm_gethost.c
|
||||
+++ b/libmilter/sm_gethost.c
|
||||
@@ -51,18 +51,20 @@
|
||||
{
|
||||
bool resv6 = true;
|
||||
struct hostent *h;
|
||||
-
|
||||
+#ifdef RES_USE_INET6
|
||||
if (family == AF_INET6)
|
||||
{
|
||||
/* From RFC2133, section 6.1 */
|
||||
resv6 = bitset(RES_USE_INET6, _res.options);
|
||||
_res.options |= RES_USE_INET6;
|
||||
}
|
||||
+#endif
|
||||
SM_SET_H_ERRNO(0);
|
||||
h = gethostbyname(name);
|
||||
+#ifdef RES_USE_INET6
|
||||
if (family == AF_INET6 && !resv6)
|
||||
_res.options &= ~RES_USE_INET6;
|
||||
-
|
||||
+#endif
|
||||
/* the function is supposed to return only the requested family */
|
||||
if (h != NULL && h->h_addrtype != family)
|
||||
{
|
||||
--- a/sendmail/conf.c
|
||||
+++ b/sendmail/conf.c
|
||||
@@ -4249,18 +4249,20 @@
|
||||
|
||||
# else /* HAS_GETHOSTBYNAME2 */
|
||||
bool resv6 = true;
|
||||
-
|
||||
+#ifdef RES_USE_INET6
|
||||
if (family == AF_INET6)
|
||||
{
|
||||
/* From RFC2133, section 6.1 */
|
||||
resv6 = bitset(RES_USE_INET6, _res.options);
|
||||
_res.options |= RES_USE_INET6;
|
||||
}
|
||||
+#endif
|
||||
SM_SET_H_ERRNO(0);
|
||||
h = gethostbyname(name);
|
||||
+#ifdef RES_USE_INET6
|
||||
if (!resv6)
|
||||
_res.options &= ~RES_USE_INET6;
|
||||
-
|
||||
+#endif
|
||||
/* the function is supposed to return only the requested family */
|
||||
if (h != NULL && h->h_addrtype != family)
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
Name: sendmail
|
||||
Version: 8.15.2
|
||||
Release: 33
|
||||
Release: 34
|
||||
Summary: A classic mail transfer agent from the Unix world
|
||||
License: Sendmail
|
||||
URL: http://www.sendmail.org/
|
||||
@ -50,6 +50,7 @@ Patch0016: sendmail-8.15.2-smtp-session-reuse-fix.patch
|
||||
Patch0017: sendmail-8.15.2-openssl-1.1.0-fix.patch
|
||||
Patch0018: sendmail-8.15.2-format-security.patch
|
||||
Patch0019: sendmail-8.15.2-openssl-1.1.0-ecdhe-fix.patch
|
||||
Patch0020: sendmail-glibc-2.30.patch
|
||||
|
||||
%description
|
||||
Sendmail is a general purpose internetwork email routing facility that
|
||||
@ -470,6 +471,12 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 30 2020 gaihuiying <gaihuiying1@huawei.com> - 8.15.2-34
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix build fail with glibc new version
|
||||
|
||||
* Sat Feb 29 2020 openEuler Buildteam <buildteam@openeuler.org> - 8.15.2-33
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user