665648
--- a/configure.ac
665648
+++ b/configure.ac
665648
@@ -764,9 +764,12 @@ main() { if (NSVersionOfRunTimeLibrary("
665648
 	i*86-*)
665648
 		seccomp_audit_arch=AUDIT_ARCH_I386
665648
 		;;
665648
-        arm*-*)
665648
+	aarch64*-*)
665648
+		seccomp_audit_arch=AUDIT_ARCH_AARCH64
665648
+		;;
665648
+	arm*-*)
665648
 		seccomp_audit_arch=AUDIT_ARCH_ARM
665648
-                ;;
665648
+		;;
665648
 	esac
665648
 	if test "x$seccomp_audit_arch" != "x" ; then
665648
 		AC_MSG_RESULT(["$seccomp_audit_arch"])
665648
diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
665648
index 095b04a..59c3682 100644
665648
--- a/sandbox-seccomp-filter.c
665648
+++ b/sandbox-seccomp-filter.c
665648
@@ -90,8 +90,10 @@ static const struct sock_filter preauth_insns[] = {
665648
 	/* Load the syscall number for checking. */
665648
 	BPF_STMT(BPF_LD+BPF_W+BPF_ABS,
665648
 		offsetof(struct seccomp_data, nr)),
665648
-	SC_DENY(open, EACCES),
665648
+	SC_DENY(openat, EACCES), /* no open() on AArch64 */
665648
+#ifdef __NR_stat
665648
 	SC_DENY(stat, EACCES),
665648
+#endif
665648
 	SC_ALLOW(getpid),
665648
 	SC_ALLOW(gettimeofday),
665648
 	SC_ALLOW(clock_gettime),
665648
@@ -111,12 +113,16 @@ static const struct sock_filter preauth_insns[] = {
665648
 	SC_ALLOW(shutdown),
665648
 #endif
665648
 	SC_ALLOW(brk),
665648
+#ifdef __NR_poll /* Not available on AArch64 */
665648
 	SC_ALLOW(poll),
665648
+#endif
665648
 #ifdef __NR__newselect
665648
 	SC_ALLOW(_newselect),
665648
 #else
665648
+#ifdef __NR_select /* Not available on AArch64 */
665648
 	SC_ALLOW(select),
665648
 #endif
665648
+#endif
665648
 	SC_ALLOW(madvise),
665648
 #ifdef __NR_mmap2 /* EABI ARM only has mmap2() */
665648
 	SC_ALLOW(mmap2),