From e8c2f1b6436aa830e2fd88cb66686d1d17186894 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Wed, 5 Feb 2025 02:43:04 +1100 Subject: [PATCH] stub out macho_strerror on non-mach (fixes linux) --- src/machista1.0/libmachista.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/machista1.0/libmachista.c b/src/machista1.0/libmachista.c index cdbe28cf4c..b758d1400f 100644 --- a/src/machista1.0/libmachista.c +++ b/src/machista1.0/libmachista.c @@ -532,6 +532,7 @@ void macho_destroy_handle(macho_handle_t *handle) { /* Returns string representation of the MACHO_* error code constants */ const char *macho_strerror(int err) { +#ifdef __MACH__ int num = fls(err); static char *errors[] = { @@ -544,5 +545,8 @@ const char *macho_strerror(int err) { /* 0x20 */ "Shared cache only", }; return errors[num]; +#else + return ""; +#endif }