getdtables() is deprecated, use sysconf()

sysconf(_SC_OPEN_MAX)