Skip to content

Commit

Permalink
stub out macho_strerror on non-mach (fixes linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Feb 4, 2025
1 parent 7bf1511 commit e8c2f1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/machista1.0/libmachista.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand All @@ -544,5 +545,8 @@ const char *macho_strerror(int err) {
/* 0x20 */ "Shared cache only",
};
return errors[num];
#else
return "";
#endif
}

0 comments on commit e8c2f1b

Please sign in to comment.