From c2f2088b2966bb7566cb1c9e2f5df99e32236a33 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Tue, 10 Aug 2021 09:54:08 +0800 Subject: [PATCH] fix build error with glibc 2.34 --- postfix-3.6.2-glibc-234-build-fix.patch | 14 ++++++++++++++ postfix.spec | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 postfix-3.6.2-glibc-234-build-fix.patch diff --git a/postfix-3.6.2-glibc-234-build-fix.patch b/postfix-3.6.2-glibc-234-build-fix.patch new file mode 100644 index 0000000..b678b78 --- /dev/null +++ b/postfix-3.6.2-glibc-234-build-fix.patch @@ -0,0 +1,14 @@ +diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h +index 99bec9b..95c78ec 100644 +--- a/src/util/sys_defs.h ++++ b/src/util/sys_defs.h +@@ -802,6 +803,9 @@ extern int initgroups(const char *, int); + #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" + #endif + #endif ++#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) ++#define HAS_CLOSEFROM ++#endif + #include + #if !defined(KERNEL_VERSION) + #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) diff --git a/postfix.spec b/postfix.spec index 557cc36..7e416b5 100644 --- a/postfix.spec +++ b/postfix.spec @@ -23,7 +23,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.3.1 -Release: 13 +Release: 14 Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -45,6 +45,7 @@ Patch6: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch7: fix-postfix-build-failed.patch Patch8: fix-build-error-with_glibc2.30-ftbfs.patch Patch9: fix-multiple-definition-error-with-gcc-10.patch +Patch10: postfix-3.6.2-glibc-234-build-fix.patch BuildRequires: libdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng @@ -107,6 +108,7 @@ PostgreSQL maps with Postfix, you need this. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 sed -i \ 's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \ @@ -492,6 +494,12 @@ fi %{postfix_doc_dir}/README_FILES/* %changelog +* Tue Aug 10 2021 gaihuiying - 2:3.3.1-14 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix build error with glibc 2.34 + * Fri Jul 30 2021 gaihuiying - 2:3.3.1-13 - Type:bugfix - ID:NA -- Gitee