Skip to content

Commit

Permalink
switch conditional compilation to target pointer width
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Oct 30, 2019
1 parent accc9d0 commit 286d27c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sys/test_ptrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ fn test_ptrace_syscall() {
// set this option to recognize syscall-stops
ptrace::setoptions(child, ptrace::Options::PTRACE_O_TRACESYSGOOD).unwrap();

#[cfg(target_arch = "x86_64")]
#[cfg(target_pointer_width = "64")]
let get_syscall_id = || ptrace::getregs(child).unwrap().orig_rax as i64;

#[cfg(target_arch = "x86")]
#[cfg(target_pointer_width = "32")]
let get_syscall_id = || ptrace::getregs(child).unwrap().orig_eax as i32;

// kill entry
Expand Down

0 comments on commit 286d27c

Please sign in to comment.