]>
Commit | Line | Data |
---|---|---|
85eed1be JP |
1 | From dfee181d1579a24c679eff960c85bc659c56993f Mon Sep 17 00:00:00 2001 |
2 | From: "Todd C. Miller" <Todd.Miller@sudo.ws> | |
3 | Date: Sat, 11 Jun 2022 16:59:18 -0600 | |
4 | Subject: [PATCH] Fix compilation on Linux/x32; GitHub issue #158 | |
5 | ||
6 | --- | |
7 | src/exec_ptrace.h | 6 ++++-- | |
8 | 1 file changed, 4 insertions(+), 2 deletions(-) | |
9 | ||
10 | diff --git a/src/exec_ptrace.h b/src/exec_ptrace.h | |
11 | index 4a5a86581..4340a48ea 100644 | |
12 | --- a/src/exec_ptrace.h | |
13 | +++ b/src/exec_ptrace.h | |
14 | @@ -64,8 +64,10 @@ | |
15 | */ | |
16 | #if defined(__x86_64__) | |
17 | # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 | |
18 | -# define X32_execve __X32_SYSCALL_BIT + 520 | |
19 | -# define X32_execveat __X32_SYSCALL_BIT + 545 | |
20 | +# ifndef __ILP32__ | |
21 | +# define X32_execve __X32_SYSCALL_BIT + 520 | |
22 | +# define X32_execveat __X32_SYSCALL_BIT + 545 | |
adfc2546 | 23 | +# endif |
85eed1be JP |
24 | # define sudo_pt_regs struct user_regs_struct |
25 | # define reg_syscall(x) (x).orig_rax | |
26 | # define reg_retval(x) (x).rax |