pkgsrc/sysutils/strace/patches/patch-ag

53 lines
1.4 KiB
Text

$NetBSD: patch-ag,v 1.3 2007/12/06 16:59:37 christos Exp $
--- defs.h.orig 2007-01-15 15:25:52.000000000 -0500
+++ defs.h 2007-12-06 11:54:37.000000000 -0500
@@ -267,6 +267,39 @@
#define PR_FAULTED S_CORE
#endif
+#ifndef LINUX
+#if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
+#define PTRACE_ATTACH PT_ATTACH
+#endif
+#if !defined(PTRACE_DETACH) && defined(PT_DETACH)
+#define PTRACE_DETACH PT_DETACH
+#endif
+#if !defined(PTRACE_TRACEME) && defined(PT_TRACE_ME)
+#define PTRACE_TRACEME PT_TRACE_ME
+#endif
+#if !defined(PTRACE_SYSCALL) && defined(PT_SYSCALL)
+#define PTRACE_SYSCALL PT_SYSCALL
+#endif
+#if !defined(PTRACE_KILL) && defined(PT_KILL)
+#define PTRACE_KILL PT_KILL
+#endif
+#if !defined(PTRACE_CONT) && defined(PT_CONTINUE)
+#define PTRACE_CONT PT_CONTINUE
+#endif
+#if !defined(PTRACE_PEEKDATA) && defined(PT_READ_D)
+#define PTRACE_PEEKDATA PT_READ_D
+#endif
+#if !defined(PTRACE_PEEKUSER) && defined(PT_READ_I)
+#define PTRACE_PEEKUSER PT_READ_I
+#endif
+#if !defined(PTRACE_GETREGS) && defined(PT_GETREGS)
+#define PTRACE_GETREGS PT_GETREGS
+#endif
+#if !defined(PTRACE_SETREGS) && defined(PT_SETREGS)
+#define PTRACE_SETREGS PT_SETREGS
+#endif
+#endif
+
/* Trace Control Block */
struct tcb {
short flags; /* See below for TCB_ values */
@@ -309,6 +342,8 @@
#endif
#ifdef FREEBSD
struct procfs_status status;
+#endif
+#ifdef ALLBSD
int pfd_reg;
int pfd_status;
#endif