summaryrefslogtreecommitdiff
path: root/lib/getdtablesize.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getdtablesize.c')
-rw-r--r--lib/getdtablesize.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 355c17e..f0c6271 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function for platforms that don't have it.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2014 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -104,4 +104,12 @@ rpl_getdtablesize(void)
return getdtablesize ();
}
+#elif defined _SC_OPEN_MAX
+
+int
+getdtablesize (void)
+{
+ return sysconf (_SC_OPEN_MAX);
+}
+
#endif