Sign in
mojo
/
mojo-tools
/
862d13b6f591fb83034e80ed5a8c59fb9d0b7b56
/
.
/
fusl
/
src
/
legacy
/
getdtablesize.c
blob: 7d6d6f29dc78e1556bcd6f893df24b99cb857f4b [
file
] [
log
] [
blame
]
#define
_GNU_SOURCE
#include
<unistd.h>
#include
<limits.h>
#include
<sys/resource.h>
int
getdtablesize
(
void
)
{
struct
rlimit rl
;
getrlimit
(
RLIMIT_NOFILE
,
&
rl
);
return
rl
.
rlim_max
<
INT_MAX
?
rl
.
rlim_max
:
INT_MAX
;
}