summaryrefslogtreecommitdiffstats
path: root/libdwfl/linux-pid-attach.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2018-02-15 14:44:18 +0100
committerMark Wielaard <[email protected]>2018-02-15 14:55:39 +0100
commit4482d0009a99b1773f2426479b666b08f57af9d5 (patch)
tree675c48a48a3156da1d2f7c9a0db46c985691e73f /libdwfl/linux-pid-attach.c
parent212b4e3d431449056aed316331ee654611671513 (diff)
Include sys/ptrace.h as early as possible.
On some systems, at least on Fedora 27 ppc64le with glibc 2.26-24 and kernel 4.14.18-300, including sys/ptrace.h late (after signal.h or sys/wait.h for example) will cause issues and produce errors like: In file included from /usr/include/asm/sigcontext.h:12:0, from /usr/include/bits/sigcontext.h:30, from /usr/include/signal.h:287, from /usr/include/sys/wait.h:36, from linux-pid-attach.c:38: /usr/include/sys/ptrace.h:73:3: error: expected identifier before numeric constant PTRACE_GETREGS = 12, ^ Swapping the include order fixes these issues. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdwfl/linux-pid-attach.c')
-rw-r--r--libdwfl/linux-pid-attach.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
index e6a5c419..2ab4109c 100644
--- a/libdwfl/linux-pid-attach.c
+++ b/libdwfl/linux-pid-attach.c
@@ -35,7 +35,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <sys/wait.h>
#include <dirent.h>
#include <unistd.h>
@@ -43,6 +42,7 @@
#include <sys/ptrace.h>
#include <sys/syscall.h>
+#include <sys/wait.h>
static bool
linux_proc_pid_is_stopped (pid_t pid)