aboutsummaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Linux/ptrace.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/Linux/ptrace.cc')
-rw-r--r--test/asan/TestCases/Linux/ptrace.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/asan/TestCases/Linux/ptrace.cc b/test/asan/TestCases/Linux/ptrace.cc
index 7e5acb64c7a1..6840ebe28bfd 100644
--- a/test/asan/TestCases/Linux/ptrace.cc
+++ b/test/asan/TestCases/Linux/ptrace.cc
@@ -31,8 +31,8 @@ int main(void) {
// CHECK: AddressSanitizer: stack-buffer-overflow
// CHECK: {{.*ptrace.cc:}}[[@LINE-2]]
assert(!res);
-#if __WORDSIZE == 64
- printf("%zx\n", regs.rip);
+#ifdef __x86_64__
+ printf("%lx\n", (unsigned long)regs.rip);
#else
printf("%lx\n", regs.eip);
#endif
@@ -42,7 +42,7 @@ int main(void) {
assert(!res);
printf("%lx\n", (unsigned long)fpregs.cwd);
-#if __WORDSIZE == 32
+#ifndef __x86_64__
user_fpxregs_struct fpxregs;
res = ptrace(PTRACE_GETFPXREGS, pid, NULL, &fpxregs);
assert(!res);