]> granicus.if.org Git - strace/commitdiff
Fix struct pt_regs declaration on i386 and x86-64
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 17 Jan 2012 18:37:13 +0000 (18:37 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 17 Jan 2012 18:37:13 +0000 (18:37 +0000)
* defs.h [I386] (i386_regs): Replace definition with declaration.
[X86_64] (x86_64_regs): Remove.
* syscall.c [X86_64] (x86_64_regs): Make static.

defs.h
syscall.c

diff --git a/defs.h b/defs.h
index 22383730fd04a383f11fc2892e319ede8a2dd170..45e32468463aa5e1d276bab9a9f13f3baacaddf0 100644 (file)
--- 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 */
 
index 706ded40a1cb1452bbcabd114d05d00364717db8..d35600683d32e8f2a0eeb8973052a6f4d1252225 100644 (file)
--- 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 */