From 4bd80c4d123bdef4d06f0e116e59e24e45a51aff Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 24 Feb 2017 16:58:20 +0100 Subject: Clean up linux-specific system includes We only include them where we actually need them and only on linux. Change-Id: Ic3065ffab67ba1177f63204fb91a92c5f4336dbb Reviewed-by: Christian Kandeler --- libdwfl/ChangeLog | 7 +++++++ libdwfl/dwfl_frame.c | 1 - libdwfl/frame_unwind.c | 1 - libdwfl/linux-pid-attach.c | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'libdwfl') diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index cc95e067..85d1b81b 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,10 @@ +2017-04-20 Ulf Hermann + + * dwfl_frame.c: Drop unused sys/ptrace.h include. + * frame_unwind.c: Likewise. + * linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on + linux. + 2017-04-20 Ulf Hermann * linux-kernel-modules.c: Include sys/types.h before fts.h diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index d6399398..1dc0c8dd 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -27,7 +27,6 @@ not, see . */ #include "libdwflP.h" -#include #include /* Set STATE->pc_set from STATE->regs according to the backend. Return true on diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c index fb42c1a7..4dc9c432 100644 --- a/libdwfl/frame_unwind.c +++ b/libdwfl/frame_unwind.c @@ -34,7 +34,6 @@ #include #include "libdwflP.h" #include "../libdw/dwarf.h" -#include #include /* Maximum number of DWARF expression stack slots before returning an error. */ diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index adfc7f81..398df96d 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -31,14 +31,15 @@ #include #include #include -#include #include #include -#include #include #ifdef __linux__ +#include +#include + static bool linux_proc_pid_is_stopped (pid_t pid) { -- cgit v1.2.3