blob: 2fde7d894f85118049b9e04df8583d13c8bae4e3 [file] [log] [blame]
#define _GNU_SOURCE
#include <limits.h>
#include <unistd.h>
int getdtablesize(void) {
int max = sysconf(_SC_OPEN_MAX);
return max < INT_MAX ? max : INT_MAX;
}