[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix Savannah bug #29511: fails to build on kfreebsd-*
From: |
James Youngman |
Subject: |
[PATCH] Fix Savannah bug #29511: fails to build on kfreebsd-* |
Date: |
Sun, 11 Apr 2010 00:05:16 +0100 |
* lib/fdleak.c (get_max_fd): Don't use RLIM_SAVED_MAX or
RLIM_SAVED_CUR. Not only are they non-portable, they aren't
useful.
* NEWS: Mention this bugfix.
Signed-off-by: James Youngman <address@hidden>
---
ChangeLog | 8 ++++++++
NEWS | 5 +++++
lib/fdleak.c | 10 +---------
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 931936d..ccf8603 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-11 James Youngman <address@hidden>
+
+ Fix Savannah bug #29511: fails to build on kfreebsd-*
+ * lib/fdleak.c (get_max_fd): Don't use RLIM_SAVED_MAX or
+ RLIM_SAVED_CUR. Not only are they non-portable, they aren't
+ useful.
+ * NEWS: Mention this bugfix.
+
2010-04-10 James Youngman <address@hidden>
* import-gnulib.config (gnulib_version): Update to current gnulib
diff --git a/NEWS b/NEWS
index 85a474c..40820f4 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU findutils NEWS - User visible changes. -*- outline
-*- (allout)
* Major changes in release 4.5.9-git, YYYY-MM-DD
+** Bug Fixes
+
+#29511: fails to build on kfreebsd-*
+
+
* Major changes in release 4.5.8, 2010-04-07
** Bug Fixes
diff --git a/lib/fdleak.c b/lib/fdleak.c
index 47f9579..e9868bd 100644
--- a/lib/fdleak.c
+++ b/lib/fdleak.c
@@ -118,17 +118,9 @@ get_max_fd (void)
/* We assume if RLIMIT_NOFILE is defined, all the related macros are, too. */
#if defined (HAVE_GETRUSAGE) && defined (RLIMIT_NOFILE)
- /* There are really only two cases here for the return value,
- but we keep the conditions separate because a different thing is
- going on in each case.
- */
if (0 == getrlimit (RLIMIT_NOFILE, &fd_limit))
{
- if (fd_limit.rlim_cur == RLIM_SAVED_MAX)
- return open_max;
- else if (fd_limit.rlim_cur == RLIM_SAVED_CUR)
- return open_max;
- else if (fd_limit.rlim_cur == RLIM_INFINITY)
+ if (fd_limit.rlim_cur == RLIM_INFINITY)
return open_max;
else
return (int) fd_limit.rlim_cur;
--
1.7.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fix Savannah bug #29511: fails to build on kfreebsd-*,
James Youngman <=