From 0c5065fc48afa229e38762856af3768e8e875d1d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 29 Aug 2026 21:00:16 +0900 Subject: [PATCH] Make build reproducible. Forwarded from . --- tools/cpp/src/cpp-build/generate_geocoding_data.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cpp/src/cpp-build/generate_geocoding_data.cc b/tools/cpp/src/cpp-build/generate_geocoding_data.cc index 17120b58ae..88943d8f77 100644 --- a/tools/cpp/src/cpp-build/generate_geocoding_data.cc +++ b/tools/cpp/src/cpp-build/generate_geocoding_data.cc @@ -91,6 +91,7 @@ class DirEntry { const std::string& name() const { return name_; } DirEntryKinds kind() const { return kind_; } + bool operator<(const DirEntry& d) { return name_ < d.name(); } private: std::string name_; @@ -118,6 +119,7 @@ bool ListDirectory(const string& path, vector* entries) { errno = 0; entry = readdir(dir); if (entry == NULL) { + std::sort(entries->begin(), entries->end()); return errno == 0; } if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {