diff options
author | Alexey Neyman <stilor@att.net> | 2017-07-13 07:38:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 07:38:03 (GMT) |
commit | 45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch) | |
tree | 8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch | |
parent | 8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff) | |
parent | b32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff) |
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch')
-rw-r--r-- | packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch b/packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch new file mode 100644 index 0000000..b57a166 --- /dev/null +++ b/packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch @@ -0,0 +1,81 @@ +This patch tries to fix the issue when PTRACE_EVENT_FORK is not found in the standard +system headers. The begininngs of this was already in place in trace.c, this patch +only takes that idea and puts it in a shared include file for trace.c *and* events.c. +The latter of which otherwise fails to build on Arm. + + Joachim Nilsson <jocke@vmlinux.org> + +diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/events.c ltrace-0.5.3/sysdeps/linux-gnu/events.c +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/events.c 2009-07-25 17:13:02.000000000 +0200 ++++ ltrace-0.5.3/sysdeps/linux-gnu/events.c 2010-01-03 14:33:46.000000000 +0100 +@@ -7,9 +7,8 @@ + #include <errno.h> + #include <signal.h> + #include <string.h> +-#include <sys/ptrace.h> + +-#include "common.h" ++#include "trace.h" + + static Event event; + +diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.c ltrace-0.5.3/sysdeps/linux-gnu/trace.c +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.c 2009-07-25 17:13:02.000000000 +0200 ++++ ltrace-0.5.3/sysdeps/linux-gnu/trace.c 2010-01-03 14:33:38.000000000 +0100 +@@ -5,10 +5,9 @@ + #include <unistd.h> + #include <sys/types.h> + #include <sys/wait.h> +-#include "ptrace.h" + #include <asm/unistd.h> + +-#include "common.h" ++#include "trace.h" + + /* If the system headers did not provide the constants, hard-code the normal + values. */ +diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.h ltrace-0.5.3/sysdeps/linux-gnu/trace.h +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.h 1970-01-01 01:00:00.000000000 +0100 ++++ ltrace-0.5.3/sysdeps/linux-gnu/trace.h 2010-01-03 14:33:26.000000000 +0100 +@@ -0,0 +1,32 @@ ++/* If the system headers did not provide the constants, hard-code the normal values. */ ++#ifndef __SYSDEPS_TRACE_H__ ++#define __SYSDEPS_TRACE_H__ ++ ++#include "ptrace.h" ++#include "common.h" ++ ++#ifndef PTRACE_EVENT_FORK ++#warning PTRACE_EVENT_FORK not found... redefining. ++#define PTRACE_OLDSETOPTIONS 21 ++#define PTRACE_SETOPTIONS 0x4200 ++#define PTRACE_GETEVENTMSG 0x4201 ++ ++/* options set using PTRACE_SETOPTIONS */ ++#define PTRACE_O_TRACESYSGOOD 0x00000001 ++#define PTRACE_O_TRACEFORK 0x00000002 ++#define PTRACE_O_TRACEVFORK 0x00000004 ++#define PTRACE_O_TRACECLONE 0x00000008 ++#define PTRACE_O_TRACEEXEC 0x00000010 ++#define PTRACE_O_TRACEVFORKDONE 0x00000020 ++#define PTRACE_O_TRACEEXIT 0x00000040 ++ ++/* Wait extended result codes for the above trace options. */ ++#define PTRACE_EVENT_FORK 1 ++#define PTRACE_EVENT_VFORK 2 ++#define PTRACE_EVENT_CLONE 3 ++#define PTRACE_EVENT_EXEC 4 ++#define PTRACE_EVENT_VFORK_DONE 5 ++#define PTRACE_EVENT_EXIT 6 ++ ++#endif /* PTRACE_EVENT_FORK */ ++#endif /* __SYSDEPS_TRACE_H__ */ +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ppc/plt.c 2009-07-25 09:13:02.000000000 -0600 ++++ ltrace-0.5.3/sysdeps/linux-gnu/ppc/plt.c 2010-09-28 18:30:07.091618190 -0600 +@@ -1,5 +1,6 @@ + #include <gelf.h> + #include "common.h" ++#include "ptrace.h" + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { |