Add patch to fix tests on arm64

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-11-20 20:13:34 +01:00
parent c1df768fdf
commit a885438e33
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From cc21c1b48d35f9d34ef2da0e184af3855bfeee5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 20 Nov 2019 14:11:12 -0500
Subject: [PATCH] tests: use openat instead of open
On arm64, __NR_open is not defined, openat is always used. Let's use openat
instead, which is defined for architectures currently.
---
tests/15-basic-resolver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c
index 6badef11fa..4884faf623 100644
--- a/tests/15-basic-resolver.c
+++ b/tests/15-basic-resolver.c
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
unsigned int arch;
char *name = NULL;
- if (seccomp_syscall_resolve_name("open") != __NR_open)
+ if (seccomp_syscall_resolve_name("openat") != __NR_openat)
goto fail;
if (seccomp_syscall_resolve_name("read") != __NR_read)
goto fail;
--
2.23.0

View File

@ -5,6 +5,8 @@ Release: 1%{?dist}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x
License: LGPLv2
Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/seccomp/libseccomp/pull/191
Patch0001: 0001-tests-use-openat-instead-of-open.patch
URL: https://github.com/seccomp/libseccomp
%ifnarch riscv64 s390
# Versions prior to 3.13.0-4 do not work on ARM with newer glibc 2.25.0-6
@ -43,7 +45,7 @@ application is allowed to execute, all of which are enforced by the Linux
Kernel.
%prep
%setup -q
%autosetup -p1
%build
%configure