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.
+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".
{
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)