Index: test/cctest/interpreter/generate-bytecode-expectations.cc |
diff --git a/test/cctest/interpreter/generate-bytecode-expectations.cc b/test/cctest/interpreter/generate-bytecode-expectations.cc |
index b9276da6b01df3711d7074445c942a11d399bda5..efc0ff25cba4cfd7d6e22d3e55bca7551259cda6 100644 |
--- a/test/cctest/interpreter/generate-bytecode-expectations.cc |
+++ b/test/cctest/interpreter/generate-bytecode-expectations.cc |
@@ -127,15 +127,14 @@ bool CollectGoldenFiles(std::vector<std::string>* golden_file_list, |
DIR* directory = opendir(directory_path); |
if (!directory) return false; |
- dirent entry_buffer; |
- dirent* entry; |
- |
- while (readdir_r(directory, &entry_buffer, &entry) == 0 && entry) { |
+ dirent* entry = readdir(directory); |
+ while (entry) { |
if (StrEndsWith(entry->d_name, ".golden")) { |
std::string golden_filename(kGoldenFilesPath); |
golden_filename += entry->d_name; |
golden_file_list->push_back(golden_filename); |
} |
+ entry = readdir(directory); |
} |
closedir(directory); |