Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
b9bb8f67bbac9bab5314fb00974ad469476e936e
/
.
/
src
/
legacy
/
getdtablesize.c
blob: 623a6af3296d10d942a011b401dd40878c7d932e [
file
] [
log
] [
blame
]
#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
;
}