]> granicus.if.org Git - strace/commitdiff
build: include ptrace.h after regs.h
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 28 Feb 2015 12:20:21 +0000 (12:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 28 Feb 2015 12:20:21 +0000 (12:20 +0000)
Restore the order of including <sys/reg.h> and <linux/ptrace.h>
headers that was inadvertently changed by commit v4.9-280-g5503dd2.

This should fix build on platforms like m68k where some constants
are defined simultaneously as enums by <sys/reg.h> and as macros
by <asm/ptrace.h>.

* process.c: Include "ptrace.h" after "regs.h".
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

process.c
signal.c
syscall.c
util.c

index a9b76c3109ccf23c24aea22f70cfce539559d742..690ca8effb0706e41c82f54495d53245aa2b5a3e 100644 (file)
--- a/process.c
+++ b/process.c
 
 #include "xlat/nt_descriptor_types.h"
 
+#include "regs.h"
 #include "ptrace.h"
 #include "xlat/ptrace_cmds.h"
 #include "xlat/ptrace_setoptions_flags.h"
 
-#include "regs.h"
-
 #define uoff(member)   offsetof(struct user, member)
 #define XLAT_UOFF(member)      { uoff(member), "offsetof(struct user, " #member ")" }
 
index 30358a195d957a0ab856f21e3d78558fdb33902c..e77fd4eba6e2b4b3a4e5a21b38cb506a798d9f39 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -34,8 +34,8 @@
 #include "defs.h"
 #include <fcntl.h>
 
-#include "ptrace.h"
 #include "regs.h"
+#include "ptrace.h"
 
 #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
 typedef struct {
index 70ba8a0942a29cf3898d0d5c16b8996049907fc2..36c1254e1097a855d8d504c7e503a08cface385c 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -37,6 +37,7 @@
 /* for struct iovec */
 #include <sys/uio.h>
 
+#include "regs.h"
 #include "ptrace.h"
 
 #if defined(SPARC64)
@@ -46,8 +47,6 @@
 # define PTRACE_SETREGS PTRACE_SETREGS64
 #endif
 
-#include "regs.h"
-
 #if defined SPARC64
 # include <asm/psrcompat.h>
 #elif defined SPARC
diff --git a/util.c b/util.c
index 89160404e679ed9ce39c4a00412a26ac37854918..02c5b9aa4f850eaa67cb1f134e0d8248939bbcb8 100644 (file)
--- a/util.c
+++ b/util.c
@@ -39,8 +39,8 @@
 #endif
 #include <sys/uio.h>
 
-#include "ptrace.h"
 #include "regs.h"
+#include "ptrace.h"
 
 int
 string_to_uint(const char *str)