diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-04-20 15:37:04 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-04-26 00:10:52 +0200 |
commit | 9c1509abe9f3934746b04eff8d91f6f9d181f41d (patch) | |
tree | 668ed5b830860d4c077f332514f22326993af15d /libdwfl | |
parent | 5dd27ffbb374b90741fb854de3e02708ffda643f (diff) |
Clean up linux-specific system includes
We only include them where we actually need them and only on linux.
Signed-off-by: Ulf Hermann <ulf.hermann@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..5c814181 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) { |