summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/getdtablesize.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
commit2512c847453c24b928c34beed88902fbb6877b7a (patch)
tree3d327c54c00684b85c435cffa29c5050888c0a69 /libc/sysdeps/linux/common/getdtablesize.c
parente83a36ce9f97ac0f59117b3a62fd2dd8461b1fd5 (diff)
Update to accomodate the header file changes
Diffstat (limited to 'libc/sysdeps/linux/common/getdtablesize.c')
-rw-r--r--libc/sysdeps/linux/common/getdtablesize.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/getdtablesize.c b/libc/sysdeps/linux/common/getdtablesize.c
index 664881f2a..016e6f62e 100644
--- a/libc/sysdeps/linux/common/getdtablesize.c
+++ b/libc/sysdeps/linux/common/getdtablesize.c
@@ -16,9 +16,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <limits.h>
+#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
+#include <limits.h>
+
+#define __LOCAL_OPEN_MAX 256
/* Return the maximum number of file descriptors
the current process could possibly have. */
@@ -29,6 +32,6 @@ int getdtablesize (void)
/* This should even work if `getrlimit' is not implemented. POSIX.1
does not define this function but we will generate a stub which
returns -1. */
- return getrlimit (RLIMIT_NOFILE, &ru) < 0 ? OPEN_MAX : ru.rlim_cur;
+ return getrlimit (RLIMIT_NOFILE, &ru) < 0 ? __LOCAL_OPEN_MAX : ru.rlim_cur;
}