From 7b587d56ee73fbfb45b884abb95bc92b34aa7952 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 3 Apr 2010 21:27:39 +0000 Subject: [PATCH] - avoid assertion failure on non-recognized O_CLOEXEC --- findutils-4.5.7-fdleak.patch | 13 +++++++++++++ findutils.spec | 12 ++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 findutils-4.5.7-fdleak.patch diff --git a/findutils-4.5.7-fdleak.patch b/findutils-4.5.7-fdleak.patch new file mode 100644 index 0000000..48bc749 --- /dev/null +++ b/findutils-4.5.7-fdleak.patch @@ -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); + } + + diff --git a/findutils.spec b/findutils.spec index 7f5570f..198f253 100644 --- a/findutils.spec +++ b/findutils.spec @@ -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 - 1:4.5.7-2 +- avoid assertion failure on non-recognized O_CLOEXEC + * Sat Apr 03 2010 Kamil Dudka - 1:4.5.7-1 - new upstream release, dropped applied patches - eliminated compile-time warnings