Sign in
fuchsia
/
fuchsia
/
910c42476df82c3677bebaaff64b4c52d76651f4
/
.
/
third_party
/
ulib
/
musl
/
src
/
legacy
/
getdtablesize.c
blob: cbeb57e402806ced655922dbde04f55e5fe1a7f8 [
file
] [
log
] [
blame
]
#define
_GNU_SOURCE
#include
<limits.h>
#include
<sys/resource.h>
#include
<unistd.h>
int
getdtablesize
(
void
)
{
struct
rlimit rl
;
getrlimit
(
RLIMIT_NOFILE
,
&
rl
);
return
rl
.
rlim_max
<
INT_MAX
?
rl
.
rlim_max
:
INT_MAX
;
}