1 [PATCH] events.c: add similar system headers workaround as trace.c
3 Needed for E.G. powerpc on uClibc.
5 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
7 sysdeps/linux-gnu/events.c | 27 +++++++++++++++++++++++++++
8 1 file changed, 27 insertions(+)
10 Index: ltrace-0.6.0/sysdeps/linux-gnu/events.c
11 ===================================================================
12 --- ltrace-0.6.0.orig/sysdeps/linux-gnu/events.c
13 +++ ltrace-0.6.0/sysdeps/linux-gnu/events.c
18 +/* If the system headers did not provide the constants, hard-code the normal
20 +#ifndef PTRACE_EVENT_FORK
22 +#define PTRACE_OLDSETOPTIONS 21
23 +#define PTRACE_SETOPTIONS 0x4200
24 +#define PTRACE_GETEVENTMSG 0x4201
26 +/* options set using PTRACE_SETOPTIONS */
27 +#define PTRACE_O_TRACESYSGOOD 0x00000001
28 +#define PTRACE_O_TRACEFORK 0x00000002
29 +#define PTRACE_O_TRACEVFORK 0x00000004
30 +#define PTRACE_O_TRACECLONE 0x00000008
31 +#define PTRACE_O_TRACEEXEC 0x00000010
32 +#define PTRACE_O_TRACEVFORKDONE 0x00000020
33 +#define PTRACE_O_TRACEEXIT 0x00000040
35 +/* Wait extended result codes for the above trace options. */
36 +#define PTRACE_EVENT_FORK 1
37 +#define PTRACE_EVENT_VFORK 2
38 +#define PTRACE_EVENT_CLONE 3
39 +#define PTRACE_EVENT_EXEC 4
40 +#define PTRACE_EVENT_VFORK_DONE 5
41 +#define PTRACE_EVENT_EXIT 6
43 +#endif /* PTRACE_EVENT_FORK */