From f94e5d40db1cf9c8d67d839d26199291a5169379 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 11 May 2022 20:07:59 -0600 Subject: [PATCH] Fix compilation error on systems with no compat arch. Currently only affects i386. --- src/exec_ptrace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exec_ptrace.c b/src/exec_ptrace.c index bd3e88691..dccd1f6f3 100644 --- a/src/exec_ptrace.c +++ b/src/exec_ptrace.c @@ -288,10 +288,13 @@ ptrace_setregs(int pid, struct sudo_ptrace_regs *regs) struct iovec iov; debug_decl(ptrace_setregs, SUDO_DEBUG_EXEC); +# ifdef SECCOMP_AUDIT_ARCH_COMPAT if (regs->compat) { iov.iov_base = ®s->u.compat; iov.iov_len = sizeof(regs->u.compat); - } else { + } else +#endif + { iov.iov_base = ®s->u.native; iov.iov_len = sizeof(regs->u.native); }