diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-02-26 23:29:18 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-02-26 23:32:02 +0100 |
commit | 601f7ee78ece7d54a12cf9191d23a3ec516d8948 (patch) | |
tree | 6ab85a5cb546211c63fb1df9e010caf160248e37 /seccomp.sh | |
parent | eed6933e6c29b131955c599bf54c4c4c3367491d (diff) | |
download | passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar.gz passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar.bz2 passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar.lz passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar.xz passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.tar.zst passt-601f7ee78ece7d54a12cf9191d23a3ec516d8948.zip |
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>
Diffstat (limited to 'seccomp.sh')
-rwxr-xr-x | seccomp.sh | 3 |
1 files changed, 3 insertions, 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}" } |