projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
remove useless __yield alias for sched_yield
[oweals/musl.git]
/
src
/
legacy
/
getdtablesize.c
1
#define _GNU_SOURCE
2
#include <unistd.h>
3
#include <limits.h>
4
#include <sys/resource.h>
5
6
int getdtablesize(void)
7
{
8
struct rlimit rl;
9
getrlimit(RLIMIT_NOFILE, &rl);
10
return rl.rlim_max < INT_MAX ? rl.rlim_max : INT_MAX;
11
}