diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-02-24 16:58:20 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-04-21 15:00:21 +0000 |
commit | 4bd80c4d123bdef4d06f0e116e59e24e45a51aff (patch) | |
tree | a0f7b6f9adfb6ac5f7d1dfa73fae76b387251219 /libdwfl | |
parent | f07a88011802b7def6224dbfc0fa8c58bf2d9cdf (diff) |
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 <christian.kandeler@qt.io>
Diffstat (limited to 'libdwfl')
-rw-r--r-- | libdwfl/ChangeLog | 7 | ||||
-rw-r--r-- | libdwfl/dwfl_frame.c | 1 | ||||
-rw-r--r-- | libdwfl/frame_unwind.c | 1 | ||||
-rw-r--r-- | libdwfl/linux-pid-attach.c | 5 |
4 files changed, 10 insertions, 4 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index cc95e067..85d1b81b 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,5 +1,12 @@ 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> + * 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 <ulf.hermann@qt.io> + * linux-kernel-modules.c: Include sys/types.h before fts.h 2017-03-24 Mark Wielaard <mark@klomp.org> 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 <http://www.gnu.org/licenses/>. */ #include "libdwflP.h" -#include <sys/ptrace.h> #include <unistd.h> /* 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 <stdlib.h> #include "libdwflP.h" #include "../libdw/dwarf.h" -#include <sys/ptrace.h> #include <system.h> /* 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 <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <sys/ptrace.h> #include <sys/wait.h> #include <dirent.h> -#include <sys/syscall.h> #include <unistd.h> #ifdef __linux__ +#include <sys/ptrace.h> +#include <sys/syscall.h> + static bool linux_proc_pid_is_stopped (pid_t pid) { |