summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-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;