summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/ptrace.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-02 09:45:14 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-02 09:45:14 +0000
commitc94d3fd8f78053c49e0329de473631a1bfa52d37 (patch)
treea67110c7513a31dd9ab24e83a1a6e3b433d5d118 /libc/sysdeps/linux/common/ptrace.c
parent5d8ce82d8c7dca45f33a21967e0b8c5406b5ca9f (diff)
Make the syscall locally, avoid an extern
Diffstat (limited to 'libc/sysdeps/linux/common/ptrace.c')
-rw-r--r--libc/sysdeps/linux/common/ptrace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/ptrace.c b/libc/sysdeps/linux/common/ptrace.c
index bc4debdac..1f2b35b33 100644
--- a/libc/sysdeps/linux/common/ptrace.c
+++ b/libc/sysdeps/linux/common/ptrace.c
@@ -19,10 +19,14 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/ptrace.h>
+#include <sys/syscall.h>
#include <stdarg.h>
-extern long int __ptrace (enum __ptrace_request, pid_t, void *, void *);
+#define __NR___syscall_ptrace __NR_ptrace
+
+static _syscall4(long, __syscall_ptrace, enum __ptrace_request, request,
+ __kernel_pid_t, pid, void*, addr, void*, data);
long int
ptrace (enum __ptrace_request request, ...)
@@ -41,7 +45,7 @@ ptrace (enum __ptrace_request request, ...)
if (request > 0 && request < 4)
data = &ret;
- res = __ptrace(request, pid, addr, data);
+ res = __syscall_ptrace(request, pid, addr, data);
if (res >= 0 && request > 0 && request < 4) {
__set_errno(0);
return ret;