From: CHEN Xiangyu Date: Thu, 9 Feb 2023 10:41:52 +0000 (+0800) Subject: privsep-linux: fix SECCOMP_AUDIT_ARCH missing ppc64le (#181) X-Git-Tag: v9.5.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb1ec1af7711615d58e6379c2947036c6cf68bd3;p=thirdparty%2Fdhcpcd.git privsep-linux: fix SECCOMP_AUDIT_ARCH missing ppc64le (#181) when dhcpcd running on ppc64le platform, it would be killed by SIGSYS. Signed-off-by: Xiangyu Chen --- diff --git a/src/privsep-linux.c b/src/privsep-linux.c index 6327b1bc..7fd5af88 100644 --- a/src/privsep-linux.c +++ b/src/privsep-linux.c @@ -213,7 +213,11 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg) #elif defined(__or1k__) # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_OPENRISC #elif defined(__powerpc64__) -# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 +# if (BYTE_ORDER == LITTLE_ENDIAN) +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE +# else +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 +# endif #elif defined(__powerpc__) # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC #elif defined(__riscv)