aboutsummaryrefslogtreecommitdiff
path: root/lib/darwin/substrate-compat.c
diff options
context:
space:
mode:
authorcomex2015-02-28 21:54:23 -0500
committercomex2015-02-28 21:54:23 -0500
commita976efe67c5f936eb553a0d61b78a311da7224d9 (patch)
tree759de2adb9ad10a80b0373b5dbefdacbc04c9c18 /lib/darwin/substrate-compat.c
parentfix accidental usage of panic() from mach/mach.h instead of substitute_panic (diff)
downloadsubstitute-a976efe67c5f936eb553a0d61b78a311da7224d9.tar.gz
Add extra argument to substitute_hook_functions and interpose_imports for use with unhooking.
I think we'll need to explicitly record trampoline locations to avoid the possibility of stomping on someone else's stuff if the function was re-patched... Also, document substitute_hook_functions.
Diffstat (limited to 'lib/darwin/substrate-compat.c')
-rw-r--r--lib/darwin/substrate-compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/darwin/substrate-compat.c b/lib/darwin/substrate-compat.c
index 3515e44..bb68366 100644
--- a/lib/darwin/substrate-compat.c
+++ b/lib/darwin/substrate-compat.c
@@ -43,7 +43,7 @@ EXPORT
void SubHookFunction(void *symbol, void *replace, void **result) __asm__("SubHookFunction");
void SubHookFunction(void *symbol, void *replace, void **result) {
struct substitute_function_hook hook = {symbol, replace, result};
- int ret = substitute_hook_functions(&hook, 1, SUBSTITUTE_NO_THREAD_SAFETY);
+ int ret = substitute_hook_functions(&hook, 1, NULL, SUBSTITUTE_NO_THREAD_SAFETY);
if (ret) {
substitute_panic("SubHookFunction: substitute_hook_functions returned %s\n",
substitute_strerror(ret));