gnu: sudo: Fix build on aarch64.
* gnu/packages/admin.scm (sudo)[source]: Add patch. * gnu/packages/patches/sudo-missing-sudo_pt_regs-aarch64.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.master
parent
5011866692
commit
5124d0dbe0
|
@ -1806,6 +1806,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/slim-reset.patch \
|
||||
%D%/packages/patches/slim-login.patch \
|
||||
%D%/packages/patches/slim-display.patch \
|
||||
%D%/packages/patches/sudo-missing-sudo_pt_regs-aarch64.patch \
|
||||
%D%/packages/patches/syslinux-gcc10.patch \
|
||||
%D%/packages/patches/syslinux-strip-gnu-property.patch \
|
||||
%D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \
|
||||
|
|
|
@ -1780,6 +1780,7 @@ system administrator.")
|
|||
(sha256
|
||||
(base32
|
||||
"1gjingc1h7d6p17m0nn87yiwh8gbdchg4w4kv8s4g89wv0q6wixm"))
|
||||
(patches (search-patches "sudo-missing-sudo_pt_regs-aarch64.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
From d549adf04bfde7936306203e2e8886ffd93d00ea Mon Sep 17 00:00:00 2001
|
||||
From: Pierre Bourdon <delroth@gmail.com>
|
||||
Date: Tue, 7 Jun 2022 17:14:39 +0200
|
||||
Subject: [PATCH] exec_ptrace: fix missing sudo_pt_regs on aarch64
|
||||
|
||||
AArch64 already had an existing "user_pt_regs" struct and didn't need a
|
||||
struct alias before the renaming to "sudo_pt_regs". Make the code build
|
||||
again by adding the now missing alias.
|
||||
|
||||
Fixes: 2eb8ff17
|
||||
---
|
||||
src/exec_ptrace.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/exec_ptrace.h b/src/exec_ptrace.h
|
||||
index 7f26283a8..4a5a86581 100644
|
||||
--- a/src/exec_ptrace.h
|
||||
+++ b/src/exec_ptrace.h
|
||||
@@ -76,6 +76,7 @@
|
||||
# define reg_arg4(x) (x).r10
|
||||
#elif defined(__aarch64__)
|
||||
# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64
|
||||
+# define sudo_pt_regs struct user_pt_regs
|
||||
# define reg_syscall(x) (x).regs[8] /* w8 */
|
||||
# define reg_retval(x) (x).regs[0] /* x0 */
|
||||
# define reg_sp(x) (x).sp /* sp */
|
Reference in New Issue