From fa7e2e7016e45c3cf98ba92e0af30d9adc0f691f Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 25 Jan 2022 19:07:05 +0100 Subject: Makefile, seccomp: Fix build for i386, ppc64, ppc64le On some distributions, on ppc64, ulimit -s returns 'unlimited': add a reasonable default, and also make sure ulimit is invoked using the default shell, which should ensure ulimit is actually implemented. Also note that AUDIT_ARCH doesn't follow closely the naming reported by 'uname -m': convert for i386 and ppc as needed. While at it, move inclusion of seccomp.h after util.h, the former is less generic (cosmetic/clang-tidy only). Older kernel headers might lack a definition for AUDIT_ARCH_PPC64LE: define that explicitly if it's not available. Signed-off-by: Stefano Brivio --- seccomp.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'seccomp.sh') diff --git a/seccomp.sh b/seccomp.sh index a055420..c710ce4 100755 --- a/seccomp.sh +++ b/seccomp.sh @@ -16,7 +16,11 @@ TMP="$(mktemp)" OUT="seccomp.h" -HEADER="/* This file was automatically generated by $(basename ${0}) */" +HEADER="/* This file was automatically generated by $(basename ${0}) */ + +#ifndef AUDIT_ARCH_PPC64LE +#define AUDIT_ARCH_PPC64LE (AUDIT_ARCH_PPC64 | __AUDIT_ARCH_LE) +#endif" # Prefix for each profile: check that 'arch' in seccomp_data is matching PRE=' -- cgit v1.2.3