mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08: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:
parent
2dd4d4224a
commit
f9b0da3d58
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user