Merge pull request #4550 from linkmauve/no-readdir_r Common: Replace deprecated readdir_r with readdir