- avoid assertion failure on non-recognized O_CLOEXEC

This commit is contained in:
Kamil Dudka 2010-04-03 21:27:39 +00:00
parent aa3c05b9de
commit 7b587d56ee
2 changed files with 21 additions and 4 deletions

View File

@ -0,0 +1,13 @@
diff --git a/lib/fdleak.c b/lib/fdleak.c
index 2c362cf..98e0caf 100644
--- a/lib/fdleak.c
+++ b/lib/fdleak.c
@@ -186,7 +186,7 @@ static int
fd_is_cloexec (int fd)
{
const int flags = fcntl (fd, F_GETFD);
- return flags & FD_CLOEXEC;
+ return (flags & FD_CLOEXEC) || (fcntl (fd, F_GETFL) & O_CLOEXEC);
}

View File

@ -1,7 +1,7 @@
Summary: The GNU versions of find utilities (find and xargs)
Name: findutils
Version: 4.5.7
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
License: GPLv3+
Group: Applications/File
@ -22,6 +22,9 @@ Patch3: findutils-4.4.2-xautofs.patch
# eliminate compile-time warnings
Patch4: findutils-4.5.7-warnings.patch
# avoid assertion failure on non-recognized O_CLOEXEC
Patch5: findutils-4.5.7-fdleak.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -48,6 +51,7 @@ useful for finding things on your system.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
# needed because of findutils-4.4.0-no-locate.patch
aclocal -I gnulib/m4 -I m4
@ -55,10 +59,7 @@ automake
touch -c configure config.h
%build
%define optflags $RPM_OPT_FLAGS -D_GNU_SOURCE
%configure
%undefine optflags
make %{?_smp_mflags}
%check
@ -108,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT
%{_infodir}/find-maint.info.gz
%changelog
* Sat Apr 03 2010 Kamil Dudka <kdudka@redhat.com> - 1:4.5.7-2
- avoid assertion failure on non-recognized O_CLOEXEC
* Sat Apr 03 2010 Kamil Dudka <kdudka@redhat.com> - 1:4.5.7-1
- new upstream release, dropped applied patches
- eliminated compile-time warnings