From: Dmitry V. Levin Date: Tue, 17 Jan 2012 18:37:13 +0000 (+0000) Subject: Fix struct pt_regs declaration on i386 and x86-64 X-Git-Tag: v4.7~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=024cad9a25bd11abc05525ab58b33cb570e29464;p=strace Fix struct pt_regs declaration on i386 and x86-64 * defs.h [I386] (i386_regs): Replace definition with declaration. [X86_64] (x86_64_regs): Remove. * syscall.c [X86_64] (x86_64_regs): Make static. --- diff --git a/defs.h b/defs.h index 22383730..45e32468 100644 --- a/defs.h +++ b/defs.h @@ -393,9 +393,7 @@ extern int mp_ioctl(int f, int c, void *a, int s); #ifdef LINUX # if defined(I386) -struct pt_regs i386_regs; -# elif defined(X86_64) -struct pt_regs x86_64_regs; +extern struct pt_regs i386_regs; # endif #endif /* LINUX */ diff --git a/syscall.c b/syscall.c index 706ded40..d3560068 100644 --- a/syscall.c +++ b/syscall.c @@ -737,7 +737,7 @@ struct tcb *tcp_last = NULL; # if defined(I386) struct pt_regs i386_regs; # elif defined(X86_64) -struct pt_regs x86_64_regs; +static struct pt_regs x86_64_regs; # elif defined (IA64) long r8, r10, psr; /* TODO: make static? */ long ia32 = 0; /* not static */