Code

Use readdir() instead of the deprecated readdir_r().