readdir_r
int readdir_r(DIR* dir, struct dirent* entry,
if (readdir_r(dir, buf, &dirent) != 0 || dirent == NULL)