Use readdir_r()