diff --git a/src/legacy/getdtablesize.c b/src/legacy/getdtablesize.c index 682da6d067583f4382d9b1f2accc8115e66af3ab..b30c1933a272d13b3d7918afd053dcd328d700c2 100644 --- a/src/legacy/getdtablesize.c +++ b/src/legacy/getdtablesize.c @@ -7,5 +7,5 @@ int getdtablesize(void) { struct rlimit rl; getrlimit(RLIMIT_NOFILE, &rl); - return rl.rlim_max < INT_MAX ? rl.rlim_max : INT_MAX; + return rl.rlim_cur < INT_MAX ? rl.rlim_cur : INT_MAX; }