Remove usage of deprecated function readdir_r (and ugly Blackberry hack diren_large)

This commit is contained in:
Henrik Rydgård
2019-01-08 12:29:59 +01:00
parent cb63df2a34
commit b572dc52a5
3 changed files with 5 additions and 12 deletions
+1 -4
View File
@@ -66,9 +66,6 @@ static bool FixFilenameCase(const std::string &path, std::string &filename)
}
//TODO: lookup filename in cache for "path"
struct dirent_large { struct dirent entry; char padding[FILENAME_MAX+1]; } diren;
struct dirent_large;
struct dirent *result = NULL;
DIR *dirp = opendir(path.c_str());
@@ -77,7 +74,7 @@ static bool FixFilenameCase(const std::string &path, std::string &filename)
bool retValue = false;
while (!readdir_r(dirp, (dirent*) &diren, &result) && result)
while ((result = readdir(dirp)))
{
if (strlen(result->d_name) != filenameSize)
continue;