* defs.h [LINUX]: Add Linux PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG,
PTRACE_O_TRACEFORK, PTRACE_EVENT_FORK, and other PTRACE_O_* and
PTRACE_EVENT_* definitions if not defined by system headers.

Signed-off-by: Jamie Lokier <ja...@shareable.org>
---
 defs.h |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/defs.h b/defs.h
index 7ce1fa6..ab69a45 100644
--- a/defs.h
+++ b/defs.h
@@ -167,6 +167,36 @@ extern int ptrace(int, int, char *, int, ...);
 #endif /* !SVR4 */
 
 #ifdef LINUX
+# ifndef PTRACE_SETOPTIONS
+#  define PTRACE_SETOPTIONS            0x4200
+#  define PTRACE_GETEVENTMSG           0x4201
+# endif
+# ifndef PTRACE_O_TRACESYSGOOD
+#  define PTRACE_O_TRACESYSGOOD                (1 << 0)
+# endif
+# ifndef PTRACE_O_TRACEFORK
+#  define PTRACE_O_TRACEFORK           (1 << 1)
+#  define PTRACE_O_TRACEVFORK          (1 << 2)
+#  define PTRACE_O_TRACECLONE          (1 << 3)
+#  define PTRACE_O_TRACEEXEC           (1 << 4)
+# endif
+# ifndef PTRACE_O_TRACEVFORKDONE
+#  define PTRACE_O_TRACEVFORKDONE      (1 << 5)
+#  define PTRACE_O_TRACEEXIT           (1 << 6)
+# endif
+# ifndef PTRACE_EVENT_FORK
+#  define PTRACE_EVENT_FORK            1
+#  define PTRACE_EVENT_VFORK           2
+#  define PTRACE_EVENT_CLONE           3
+#  define PTRACE_EVENT_EXEC            4
+# endif
+# ifndef PTRACE_EVENT_VFORK_DONE
+#  define PTRACE_EVENT_VFORK_DONE      5
+#  define PTRACE_EVENT_EXIT            6
+# endif
+#endif /* LINUX */
+
+#ifdef LINUX
 #if !defined(__GLIBC__)
 #define        PTRACE_PEEKUSER PTRACE_PEEKUSR
 #define        PTRACE_POKEUSER PTRACE_POKEUSR
-- 
1.7.0.4

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to