diff options
Diffstat (limited to 'seccomp.sh')
-rwxr-xr-x | seccomp.sh | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -17,6 +17,9 @@ TMP="$(mktemp)" IN="$@" OUT="seccomp.h" +[ -z "${ARCH}" ] && ARCH="$(uname -m)" +[ -z "${CC}" ] && CC="cc" + HEADER="/* This file was automatically generated by $(basename ${0}) */ #ifndef AUDIT_ARCH_PPC64LE @@ -110,7 +113,7 @@ log2() { # $1: Name of syscall syscall_nr() { __in="$(printf "#include <asm-generic/unistd.h>\n#include <sys/syscall.h>\n__NR_%s" ${1})" - __out="$(echo "${__in}" | cc -E -xc - -o - | tail -1)" + __out="$(echo "${__in}" | ${CC} -E -xc - -o - | tail -1)" [ "${__out}" = "__NR_$1" ] && return 1 # Output might be in the form "(x + y)" (seen on armv6l, armv7l) @@ -125,7 +128,7 @@ filter() { case ${__c} in *:*) case ${__c} in - $(uname -m):*) + ${ARCH}:*) __arch_match=1 __c=${__c##*:} ;; |