Updated patch fixing FTBFS with the glibc-2.34

This commit is contained in:
Jaroslav Škarvada 2021-08-05 11:00:55 +02:00
parent b2278b1ff4
commit d71adada04
2 changed files with 22 additions and 41 deletions

View File

@ -1,43 +1,22 @@
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 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 --- a/src/util/sys_defs.h
+++ b/src/util/sys_defs.h +++ b/src/util/sys_defs.h
@@ -1509,7 +1509,7 @@ extern int setsid(void); @@ -1,6 +1,7 @@
#ifndef _SYS_DEFS_H_INCLUDED_
#define _SYS_DEFS_H_INCLUDED_
+
/*++
/* NAME
/* sys_defs 3h
@@ -802,6 +803,9 @@ extern int initgroups(const char *, int);
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
#endif #endif
#ifndef HAS_CLOSEFROM
-extern int closefrom(int);
+extern void closefrom(int);
#endif #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 Name: postfix
Summary: Postfix Mail Transport Agent Summary: Postfix Mail Transport Agent
Version: 3.6.2 Version: 3.6.2
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 2 Epoch: 2
URL: http://www.postfix.org URL: http://www.postfix.org
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -94,8 +94,7 @@ Patch9: pflogsumm-1.1.5-datecalc.patch
# rhbz#1384871, sent upstream # rhbz#1384871, sent upstream
Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch
Patch11: postfix-3.4.4-chroot-example-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch
# bug report sent upstream, the fedora patch is a hack, # upstream patch
# please do not reuse ;)
Patch12: postfix-3.6.2-glibc-234-build-fix.patch Patch12: postfix-3.6.2-glibc-234-build-fix.patch
# Optional patches - set the appropriate environment variables to include # Optional patches - set the appropriate environment variables to include
@ -797,6 +796,9 @@ fi
%endif %endif
%changelog %changelog
* Thu Aug 5 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.6.2-4
- Updated patch fixing FTBFS with the glibc-2.34
* Tue Aug 3 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.6.2-3 * Tue Aug 3 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.6.2-3
- Fixed openssl req parameters - Fixed openssl req parameters