diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-03-17 09:14:38 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-03-17 09:21:25 +0100 |
commit | 046a48b4df745b144b42508cc19e7ea077406206 (patch) | |
tree | dc2a57e39f1ff2a01bc4b5e54cc82895fb38742a /net-misc/dhcpcd | |
parent | dev-python/pandas: Restore FMA use, the test is wrong (diff) | |
download | gentoo-046a48b4df745b144b42508cc19e7ea077406206.tar.gz gentoo-046a48b4df745b144b42508cc19e7ea077406206.tar.bz2 gentoo-046a48b4df745b144b42508cc19e7ea077406206.zip |
net-misc/dhcpcd: Fixed build on sparc with USE="privsep"
Closes: https://bugs.gentoo.org/776178
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-misc/dhcpcd')
-rw-r--r-- | net-misc/dhcpcd/dhcpcd-9.3.4.ebuild | 4 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild index 1fa46b7c2467..71dc46831ee3 100644 --- a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild +++ b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild @@ -33,6 +33,10 @@ RDEPEND=" ) " +PATCHES=( + "${FILESDIR}/${PN}-9.4.0-sparc_privsep.patch" #776178 +) + src_configure() { local myeconfargs=( --dbdir="${EPREFIX}/var/lib/dhcpcd" diff --git a/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch b/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch new file mode 100644 index 000000000000..a91db28d08c7 --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch @@ -0,0 +1,40 @@ +From dcfd7a23f002793a855156255e81662ef84064d3 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Fri, 5 Feb 2021 09:25:12 +0100 +Subject: [PATCH] src/privsep-linux: fix build on sparc (#26) + +Fix the following build failure: + +privsep-linux.c:203: warning: "AUDIT_ARCH_SPARC64" redefined + 203 | # define AUDIT_ARCH_SPARC64 + | +In file included from privsep-linux.c:35: +/srv/storage/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/linux/audit.h:392: note: this is the location of the previous definition + 392 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) + | +In file included from privsep-linux.c:36: +privsep-linux.c:215:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'? + 215 | BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0), + | ^~~~~~~~~~~~~~~~~~ + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + src/privsep-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/privsep-linux.c b/src/privsep-linux.c +index d00894ab..5c80c1b3 100644 +--- a/src/privsep-linux.c ++++ b/src/privsep-linux.c +@@ -222,9 +222,9 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg) + # endif + #elif defined(__sparc__) + # if defined(__arch64__) +-# define AUDIT_ARCH_SPARC64 ++# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC64 + # else +-# define AUDIT_ARCH_SPARC ++# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC + # endif + #elif defined(__xtensa__) + # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_XTENSA |