Skip to content

Commit

Permalink
fix bug for macOS Serria
Browse files Browse the repository at this point in the history
  • Loading branch information
wzqcongcong committed Nov 8, 2016
1 parent 9826bbb commit 06823c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mach_inject_bundle_stub/mach_inject_bundle_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ INJECT_ENTRY(
// On intel, per-pthread data is a zone of data that must be allocated.
// if not, all function trying to access per-pthread data (all mig functions for instance)
// will crash.
extern void __pthread_set_self(char*);
__pthread_set_self(dummy_pthread_struct);
// on macOS Serria, should use _pthread_set_self from libSystem.B.dylb
extern void _pthread_set_self(char*);
_pthread_set_self(dummy_pthread_struct);
#endif

// fprintf(stderr, "mach_inject_bundle: entered in %s, codeOffset: %td, param: %p, paramSize: %lu\n",
Expand Down

0 comments on commit 06823c9

Please sign in to comment.