cap getdents length argument to INT_MAX