aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-21 17:14:22 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-02-21 17:14:22 +0100
commit8ffb09a08a375e19208bbe65ba532ce1e462b74e (patch)
treed6da937a715ff2efc9d98dd7cb240d9b17324ee8 /src/resolve-system-dependencies
parent36c7b12f3354606a50808197f6695c185fd02893 (diff)
Fix macOS build
Diffstat (limited to 'src/resolve-system-dependencies')
-rw-r--r--src/resolve-system-dependencies/resolve-system-dependencies.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc
index 98c969437..4dd691981 100644
--- a/src/resolve-system-dependencies/resolve-system-dependencies.cc
+++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc
@@ -23,9 +23,9 @@ Path resolveCacheFile(Path lib)
return cacheDir + "/" + lib;
}
-std::set<string> readCacheFile(const Path & file)
+std::set<std::string> readCacheFile(const Path & file)
{
- return tokenizeString<set<string>>(readFile(file), "\n");
+ return tokenizeString<std::set<std::string>>(readFile(file), "\n");
}
std::set<std::string> runResolver(const Path & filename)
@@ -81,7 +81,7 @@ std::set<std::string> runResolver(const Path & filename)
bool should_swap = magic == MH_CIGAM_64;
ptrdiff_t cmd_offset = mach64_offset + sizeof(mach_header_64);
- std::set<string> libs;
+ std::set<std::string> libs;
for (uint32_t i = 0; i < DO_SWAP(should_swap, m_header->ncmds); i++) {
load_command * cmd = (load_command *) (obj + cmd_offset);
switch(DO_SWAP(should_swap, cmd->cmd)) {
@@ -110,9 +110,9 @@ Path resolveSymlink(const Path & path)
: concatStrings(dirOf(path), "/", target);
}
-std::set<string> resolveTree(const Path & path, PathSet & deps)
+std::set<std::string> resolveTree(const Path & path, PathSet & deps)
{
- std::set<string> results;
+ std::set<std::string> results;
if (!deps.insert(path).second) return {};
for (auto & lib : runResolver(path)) {
results.insert(lib);
@@ -123,7 +123,7 @@ std::set<string> resolveTree(const Path & path, PathSet & deps)
return results;
}
-std::set<string> getPath(const Path & path)
+std::set<std::string> getPath(const Path & path)
{
if (hasPrefix(path, "/dev")) return {};
@@ -131,7 +131,7 @@ std::set<string> getPath(const Path & path)
if (pathExists(cacheFile))
return readCacheFile(cacheFile);
- std::set<string> deps, paths;
+ std::set<std::string> deps, paths;
paths.insert(path);
Path nextPath(path);
@@ -180,7 +180,7 @@ int main(int argc, char ** argv)
impurePaths.insert("/usr/lib/libSystem.dylib");
}
- std::set<string> allPaths;
+ std::set<std::string> allPaths;
for (auto & path : impurePaths)
for (auto & p : getPath(path))