Fixed FTBFS with glibc-2.34

Resolves: rhbz#1984045
This commit is contained in:
Jaroslav Škarvada 2021-08-03 10:11:30 +02:00
parent c7f4d269b1
commit cd3fdc37bc
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,43 @@
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
--- a/src/util/sys_defs.h
+++ b/src/util/sys_defs.h
@@ -1509,7 +1509,7 @@ extern int setsid(void);
#endif
#ifndef HAS_CLOSEFROM
-extern int closefrom(int);
+extern void closefrom(int);
#endif

View File

@ -49,7 +49,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.5.9
Release: 10%{?dist}
Release: 11%{?dist}
Epoch: 2
URL: http://www.postfix.org
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -94,6 +94,8 @@ 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
Patch12: postfix-3.5.9-glibc-234-build-fix.patch
# Optional patches - set the appropriate environment variables to include
# them when building the package/spec file
@ -244,6 +246,7 @@ pushd pflogsumm-%{pflogsumm_ver}
popd
%endif
%patch11 -p1 -b .chroot-example-fix
%patch12 -p1 -b .glibc-234-build-fix
for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do
iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
@ -787,6 +790,10 @@ fi
%endif
%changelog
* Tue Aug 3 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.5.9-11
- Fixed FTBFS with glibc-2.34
Resolves: rhbz#1984045
* Mon Aug 2 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2:3.5.9-10
- Fixed scriptlets to work with openssl-3.0
Resolves: rhbz#1985918