mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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".
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user