Used upstream patch for fixing FTBFS with glibc-2.34

Related: rhbz#1984045
This commit is contained in:
Jaroslav Škarvada 2021-08-05 11:18:13 +02:00
parent efe558684f
commit 52d927f509
2 changed files with 15 additions and 40 deletions

View File

@ -1,43 +1,14 @@
diff --git a/src/util/sys_compat.c b/src/util/sys_compat.c
index 8bf8e58..c87f043 100644
--- a/src/util/sys_compat.c
+++ b/src/util/sys_compat.c
@@ -286,7 +286,7 @@ int dup2_pass_on_exec(int oldd, int newd)
/* closefrom() - closes all file descriptors from the given one up */
-int closefrom(int lowfd)
+void closefrom(int lowfd)
{
int fd_limit = open_limit(0);
int fd;
@@ -298,14 +298,14 @@ int closefrom(int lowfd)
*/
if (lowfd < 0) {
errno = EBADF;
- return (-1);
+ return;
}
if (fd_limit > 500)
fd_limit = 500;
for (fd = lowfd; fd < fd_limit; fd++)
(void) close(fd);
- return (0);
+ return;
}
#endif
diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
index 99bec9b..16e27db 100644
index 99bec9b..95c78ec 100644
--- a/src/util/sys_defs.h
+++ b/src/util/sys_defs.h
@@ -1509,7 +1509,7 @@ extern int setsid(void);
@@ -802,6 +803,9 @@ extern int initgroups(const char *, int);
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
#endif
#ifndef HAS_CLOSEFROM
-extern int closefrom(int);
+extern void closefrom(int);
#endif
+#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34)
+#define HAS_CLOSEFROM
+#endif
#include <linux/version.h>
#if !defined(KERNEL_VERSION)
#define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)

View File

@ -49,7 +49,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.5.9
Release: 12%{?dist}
Release: 13%{?dist}
Epoch: 2
URL: http://www.postfix.org
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -94,7 +94,7 @@ Patch9: pflogsumm-1.1.5-datecalc.patch
# rhbz#1384871, sent upstream
Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch
Patch11: postfix-3.4.4-chroot-example-fix.patch
# reported upstream
# upstream patch
Patch12: postfix-3.5.9-glibc-234-build-fix.patch
# Optional patches - set the appropriate environment variables to include
@ -790,6 +790,10 @@ fi
%endif
%changelog
* Thu Aug 5 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.5.9-13
- Used upstream patch for fixing FTBFS with glibc-2.34
Related: rhbz#1984045
* Tue Aug 3 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.5.9-12
- Fixed openssl req command parameter
Related: rhbz#1985918