aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2013-11-16 22:50:09 -0500
committerJoel Brobecker <brobecker@adacore.com>2013-12-02 07:14:10 +0400
commitf9b0da3d5833ad5f809422f3084b0ef8fa5c5762 (patch)
tree39fbac4359f2e58437b4dacb579dec76fd41690a /gdb/common
parent2dd4d4224afba558be14b39e2886ba47b2132678 (diff)
downloadgdb-f9b0da3d5833ad5f809422f3084b0ef8fa5c5762.zip
gdb-f9b0da3d5833ad5f809422f3084b0ef8fa5c5762.tar.gz
gdb-f9b0da3d5833ad5f809422f3084b0ef8fa5c5762.tar.bz2
Fix filestuff.c build error if RLIMIT_NOFILE not defined.
Not all systems supporting getrlimit also support RLIMIT_NOFILE (Eg. All LynxOS systems appear to be lacking support for this). So check its existance before using it. gdb/ChangeLog: * common/filestuff.c (fdwalk): Add "defined(RLIMIT_NOFILE)" preprocessor check.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/filestuff.c2
1 files changed, 1 insertions, 1 deletions
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)