seccomp.sh: Handle syscall number defines in the (x + y) form
This is the case at least for current glibc headers on armv6l and armv7l. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
eed6933e6c
commit
601f7ee78e
1 changed files with 3 additions and 0 deletions
|
@ -109,6 +109,9 @@ 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}" = "__NR_$1" ] && return 1
|
||||
|
||||
# Output might be in the form "(x + y)" (seen on armv6l, armv7l)
|
||||
__out="$(eval echo $((${__out})))"
|
||||
echo "${__out}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue