summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-02-05 13:00:12 -0800
committerRuss Cox <rsc@golang.org>2009-02-05 13:00:12 -0800
commit53337c0c2e0a6b03def6cc34cf2418c3a3c7d130 (patch)
treefe5adf80fa5422f61d702a69d641269c1bed7080
parentdcb14c6b23d1ae880d966b0afb335109cae24e3d (diff)
downloadgolang-53337c0c2e0a6b03def6cc34cf2418c3a3c7d130.tar.gz
fix build on thresher - missing constants
TBR=r OCL=24439 CL=24439
-rw-r--r--src/libmach_amd64/linux.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libmach_amd64/linux.c b/src/libmach_amd64/linux.c
index b9f18fd4f..3e156c97f 100644
--- a/src/libmach_amd64/linux.c
+++ b/src/libmach_amd64/linux.c
@@ -41,6 +41,31 @@
#include <ureg_amd64.h>
#undef waitpid
+// The old glibc used with crosstool compilers on thresher
+// doesn't know these numbers, but the Linux kernel
+// had them as far back as 2.6.0.
+#ifndef WSTOPPED
+#define WSTOPPED 2
+#define WCONTINUED 8
+#define WIFCONTINUED(x) ((x) == 0xffff)
+#endif
+#ifndef PTRACE_SETOPTIONS
+#define PTRACE_SETOPTIONS 0x4200
+#define PTRACE_GETEVENTMSG 0x4201
+#define PTRACE_O_TRACEFORK 0x2
+#define PTRACE_O_TRACEVFORK 0x4
+#define PTRACE_O_TRACECLONE 0x8
+#define PTRACE_O_TRACEEXEC 0x10
+#define PTRACE_O_TRACEVFORKDONE 0x20
+#define PTRACE_O_TRACEEXIT 0x40
+#define PTRACE_EVENT_FORK 0x1
+#define PTRACE_EVENT_VFORK 0x2
+#define PTRACE_EVENT_CLONE 0x3
+#define PTRACE_EVENT_EXEC 0x4
+#define PTRACE_EVENT_VFORK_DONE 0x5
+#define PTRACE_EVENT_EXIT 0x6
+#endif
+
typedef struct Ureg Ureg;
static Maprw ptracesegrw;