From 8f259a1427d5cce7e4ad4d322d29861c855bfa2e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 27 Jan 2023 23:32:49 -0600 Subject: [PATCH] Don't pull in a header for a constant 1 that's not even in ELF spec and hasn't changed since 1995. (If file and readelf didn't need elf.h... even the ptrace man page notes this is "constant 1".) --- toys/pending/strace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toys/pending/strace.c b/toys/pending/strace.c index 54719861..e340a4f7 100644 --- a/toys/pending/strace.c +++ b/toys/pending/strace.c @@ -18,7 +18,6 @@ config STRACE -v Dump all of large structs/arrays. */ -#include #include #include @@ -172,7 +171,7 @@ static void get_regs(void) { struct iovec v = {.iov_base=&TT.regs, .iov_len=sizeof(TT.regs)}; - xptrace(PTRACE_GETREGSET, TT.pid, (void *)NT_PRSTATUS, &v); + xptrace(PTRACE_GETREGSET, TT.pid, (void *)1, &v); // NT_PRSTATUS } static void ptrace_struct(long addr, void *dst, size_t bytes) -- 2.39.2