From f896c904e8f160c641d1912f958a23d2c58c06d1 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 20 Dec 2018 18:20:32 +0100 Subject: [PATCH] tlsdate: fix build on ppc64 targets --- srcpkgs/tlsdate/patches/aarch64-ppc64.patch | 25 +++++++++++++++++++++ srcpkgs/tlsdate/patches/aarch64.patch | 21 ----------------- 2 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/tlsdate/patches/aarch64-ppc64.patch delete mode 100644 srcpkgs/tlsdate/patches/aarch64.patch diff --git a/srcpkgs/tlsdate/patches/aarch64-ppc64.patch b/srcpkgs/tlsdate/patches/aarch64-ppc64.patch new file mode 100644 index 0000000000..a66c457663 --- /dev/null +++ b/srcpkgs/tlsdate/patches/aarch64-ppc64.patch @@ -0,0 +1,25 @@ +--- src/seccomp.c.orig 2018-12-20 16:56:30.070932156 +0100 ++++ src/seccomp.c 2018-12-20 16:57:19.849670660 +0100 +@@ -43,6 +43,12 @@ + # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_I386 + #elif defined(__x86_64__) + # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 ++#elif defined(__aarch64__) ++# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64 ++#elif defined(__powerpc64le__) ++# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE ++#elif defined(__powerpc64__) ++# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 + #elif defined(__arm__) + # ifndef EM_ARM + # define EM_ARM 40 +@@ -87,7 +89,9 @@ + SC_ALLOW (exit_group), + SC_ALLOW (exit), + ++#ifdef __NR_open + SC_DENY (open, EINVAL), ++#endif + SC_DENY (fcntl, EINVAL), + SC_DENY (fstat, EINVAL), + #ifdef __NR_mmap diff --git a/srcpkgs/tlsdate/patches/aarch64.patch b/srcpkgs/tlsdate/patches/aarch64.patch deleted file mode 100644 index b0ea3f8d4e..0000000000 --- a/srcpkgs/tlsdate/patches/aarch64.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- src/seccomp.c.orig 2015-05-28 20:49:40.000000000 +0200 -+++ src/seccomp.c 2017-02-27 20:02:02.490783181 +0100 -@@ -48,6 +48,8 @@ - # define EM_ARM 40 - # endif - # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM -+#elif defined(__aarch64__) -+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64 - #else - # error "Platform does not support seccomp filter yet" - #endif -@@ -87,7 +89,9 @@ - SC_ALLOW (exit_group), - SC_ALLOW (exit), - -+#ifdef __NR_open - SC_DENY (open, EINVAL), -+#endif - SC_DENY (fcntl, EINVAL), - SC_DENY (fstat, EINVAL), - #ifdef __NR_mmap