From 0eb22db3116585821096b7b81295d4bbf5550343 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 Jan 2021 12:46:22 +0100 Subject: [PATCH] Fix macOS build --- .../resolve-system-dependencies.cc | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc index d30227e4e..27cf53a45 100644 --- a/src/resolve-system-dependencies/resolve-system-dependencies.cc +++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc @@ -39,18 +39,12 @@ std::set runResolver(const Path & filename) throw SysError("statting '%s'", filename); if (!S_ISREG(st.st_mode)) { - logError({ - .name = "Regular MACH file", - .hint = hintfmt("file '%s' is not a regular file", filename) - }); + printError("file '%s' is not a regular MACH binary", filename); return {}; } if (st.st_size < sizeof(mach_header_64)) { - logError({ - .name = "File too short", - .hint = hintfmt("file '%s' is too short for a MACH binary", filename) - }); + printError("file '%s' is too short for a MACH binary", filename); return {}; } @@ -72,19 +66,13 @@ std::set runResolver(const Path & filename) } } if (mach64_offset == 0) { - logError({ - .name = "No mach64 blobs", - .hint = hintfmt("Could not find any mach64 blobs in file '%1%', continuing...", filename) - }); + printError("could not find any mach64 blobs in file '%1%', continuing...", filename); return {}; } } else if (magic == MH_MAGIC_64 || magic == MH_CIGAM_64) { mach64_offset = 0; } else { - logError({ - .name = "Magic number", - .hint = hintfmt("Object file has unknown magic number '%1%', skipping it...", magic) - }); + printError("Object file has unknown magic number '%1%', skipping it...", magic); return {}; }