summaryrefslogtreecommitdiff
path: root/lib/interception/interception_mac.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2013-01-18 20:06:45 +0000
committerAndrew Turner <andrew@FreeBSD.org>2013-01-18 20:06:45 +0000
commit58aabf08b77d221489f10e274812ec60917c21a8 (patch)
treeb946f82269be87d83f086167c762c362e734c5bb /lib/interception/interception_mac.h
parent37dfff057418e02f8e5322da12684dd927e3d881 (diff)
Notes
Diffstat (limited to 'lib/interception/interception_mac.h')
-rw-r--r--lib/interception/interception_mac.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/interception/interception_mac.h b/lib/interception/interception_mac.h
index 224d961eefe04..6e9e80817cb36 100644
--- a/lib/interception/interception_mac.h
+++ b/lib/interception/interception_mac.h
@@ -35,12 +35,14 @@ mach_error_t __interception_deallocate_island(void *ptr);
namespace __interception {
// returns true if the old function existed.
-bool OverrideFunction(void *old_func, void *new_func, void **orig_old_func);
+bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func);
} // namespace __interception
# define OVERRIDE_FUNCTION_MAC(old_func, new_func) \
- ::__interception::OverrideFunction((void*)old_func, (void*)new_func, \
- (void**)&REAL(old_func))
+ ::__interception::OverrideFunction( \
+ (::__interception::uptr)old_func, \
+ (::__interception::uptr)new_func, \
+ (::__interception::uptr*)((::__interception::uptr)&REAL(old_func)))
# define INTERCEPT_FUNCTION_MAC(func) OVERRIDE_FUNCTION_MAC(func, WRAP(func))
#endif // INTERCEPTION_MAC_H