aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/common/filestuff.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a328d06..62abbac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-12-02 Joel Brobecker <brobecker@adacore.com>
+ * common/filestuff.c (fdwalk): Add "defined(RLIMIT_NOFILE)"
+ preprocessor check.
+
+2013-12-02 Joel Brobecker <brobecker@adacore.com>
+
* Makefile.in (HFILES_NO_SRCDIR): Remove "common/gdb_dirent.h".
2013-12-02 Joel Brobecker <brobecker@adacore.com>
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 2792d59..b884c02 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -115,7 +115,7 @@ fdwalk (int (*func) (void *, int), void *arg)
{
int max, fd;
-#ifdef HAVE_GETRLIMIT
+#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)
struct rlimit rlim;
if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 && rlim.rlim_max != RLIM_INFINITY)