build: include ptrace.h after regs.h
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.
diff --git a/process.c b/process.c
index a9b76c3..690ca8e 100644
--- a/process.c
+++ b/process.c
@@ -42,12 +42,11 @@
#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 ")" }
diff --git a/signal.c b/signal.c
index 30358a1..e77fd4e 100644
--- 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 {
diff --git a/syscall.c b/syscall.c
index 70ba8a0..36c1254 100644
--- 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 8916040..02c5b9a 100644
--- 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)