From 60f87ef3be67bfe62042dc7a150932f2d6251829 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sat, 2 Jul 2022 10:11:00 +0200 Subject: [PATCH] Add error for EBADARCH That's apparently errno 86 on macOS, and it's triggered when the architecture is wrong. I'll leave other macOS errors to the macOS users. See #9052. --- src/postfork.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/postfork.cpp b/src/postfork.cpp index 8b1784997..8c6263ade 100644 --- a/src/postfork.cpp +++ b/src/postfork.cpp @@ -543,6 +543,14 @@ void safe_report_exec_error(int err, const char *actual_cmd, const char *const * actual_cmd); break; } +#ifdef EBADARCH + case EBADARCH: { + FLOGF_SAFE(exec, + "Failed to execute process '%s': Bad CPU type in executable.", + actual_cmd); + break; + } +#endif default: { char errnum_buff[64]; format_long_safe(errnum_buff, err);