Mail archive
alpine-aports

[alpine-aports] [PATCH] main/tlsdate: fix build on mips*

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Mon, 26 Nov 2018 22:05:43 +0000

Add some trivial #define's for mips* support. No test suite
in the package but produced binary works on mipsel at least.
---
 main/tlsdate/APKBUILD               |  4 +++-
 main/tlsdate/tlsdate-add-mips.patch | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 main/tlsdate/tlsdate-add-mips.patch
diff --git a/main/tlsdate/APKBUILD b/main/tlsdate/APKBUILD
index 8b587d74f2..6cabe8b714 100644
--- a/main/tlsdate/APKBUILD
+++ b/main/tlsdate/APKBUILD
_at_@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=tlsdate
 pkgver=0.0.13
-pkgrel=6
+pkgrel=7
 pkgdesc="An secure parasitic rdate replacement"
 url="https://github.com/ioerror/tlsdate"
 arch="all"
_at_@ -20,6 +20,7 @@ source="tlsdate-${pkgver}.tar.gz::https://github.com/ioerror/tlsdate/tarball/tls
 	tlsdated.confd
 	tlsdated.initd
 	tlsdate-add-secondary-archs.patch
+	tlsdate-add-mips.patch
 	libressl-no-sslv3.patch
 	libressl-sslstate.patch
 	"
_at_@ -56,5 +57,6 @@ c54d11ead7ee5035e4829df92b23cd54a71535199844b4f64ecfa715d9838ef954e7c2434df0767b
 38bd7d64473ab487eea2539b11a7acadfc3fa5a627fb12e78931b62c46d3ebedab4c75d56839b0dee9fd8f42d4b7ae9ace08ea3f58941b8e2d183828c6a4fef2  tlsdated.confd
 9601ab4f9bd8870ed0c8e4f9dcbc32df902a5998ea6eeb8c40b8a8286515f35bf2d755784d267f78d53ac9baaf2d20051e99c35ceabe9d846d9a2a40cf135760  tlsdated.initd
 03ebe29088f91eb45a13a467797c4f5a88233e2ebea957ca72012fe892dea1377b652f8aadaab865352a37d255df674f1abba09f6670bf8a9015aebfce89cf77  tlsdate-add-secondary-archs.patch
+da5eb21058f1aeb9783db575434750e7c01b5372d1135f8e945da1f39c7eadfb3c2251163f40bebc53756482e9673160d99a912935b50fc743a9c3f91dfcf20f  tlsdate-add-mips.patch
 513ccff7056c0764a5d821a90819a0e293921fafc3d0f9ba93e42564bac2b6d041599eb075dfe43cb5d760e67e3ae9f5a46d3359080284c3df1adb845463478b  libressl-no-sslv3.patch
 251913739da7da0fdd6b5a597dbe1c8fa42ffc6714d6621922ce15f685eb89afd466015519ff700a2e28314f736cd5d4526e872adca98d6a2edad8c338691693  libressl-sslstate.patch"
diff --git a/main/tlsdate/tlsdate-add-mips.patch b/main/tlsdate/tlsdate-add-mips.patch
new file mode 100644
index 0000000000..44b4cf962e
--- /dev/null
+++ b/main/tlsdate/tlsdate-add-mips.patch
_at_@ -0,0 +1,22 @@
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+_at_@ -60,6 +60,19 @@
+ #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_S390
+ #elif defined(__s390x__)
+ #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_S390X
++#elif defined(__mips64)
++/* FIXME: add N32 support */
++#  ifdef __MIPSEL__
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPSEL64
++#  else
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS64
++#  endif
++#elif defined(__mips)
++#  ifdef __MIPSEL__
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPSEL
++#  else
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS
++#  endif
+ #else
+ #  error "Platform does not support seccomp filter yet"
+ #endif
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Nov 26 2018 - 22:05:43 UTC