diff --git a/adb-hooks/src/lib.rs b/adb-hooks/src/lib.rs index 96a831a..fa1480c 100644 --- a/adb-hooks/src/lib.rs +++ b/adb-hooks/src/lib.rs @@ -427,9 +427,6 @@ unsafe extern "C" fn close(fd: c_int) -> c_int { // type OpenFn = unsafe extern "C" fn(*const c_char, c_int, ...) -> c_int; // static REAL_OPEN: Lazy = Lazy::new(|| func!(LIBC, open)); -// static REAL_OPEN: Lazy = Lazy::new(|| unsafe{ -// mem::transmute(redhook::ld_preload::dlsym_next("open\0")) -// }); #[no_mangle] pub unsafe extern "C" fn open(pathname: *const c_char, flags: c_int, mut args: ...) -> c_int { diff --git a/dlhook/src/lib.rs b/dlhook/src/lib.rs index 61fd169..9be4d45 100644 --- a/dlhook/src/lib.rs +++ b/dlhook/src/lib.rs @@ -164,7 +164,6 @@ impl<'a> LibHandle<'a> { #[macro_export] macro_rules! func { ($lib_handle:ident, $real_fn:ident) => {{ - // ::dlhook::named_func($real_fn, concat!(stringify!($real_fn), "\0")) let nf = ::dlhook::named_func($real_fn, stringify!($real_fn)); let addr = $lib_handle.sym_addr(nf, |sym| { sym as *const usize == $real_fn as *const usize