From 28809bb0684a5ddc9ce0eccf3e06bfbe9ff25a44 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sat, 29 Aug 2020 23:49:18 +0300 Subject: [PATCH] mariadb: re-add deleted patch 'my_rdtsc.h.patch' --- packages/mariadb/build.sh | 1 + packages/mariadb/my_rdtsc.h.patch | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 packages/mariadb/my_rdtsc.h.patch diff --git a/packages/mariadb/build.sh b/packages/mariadb/build.sh index a68742df0..f8fad122b 100644 --- a/packages/mariadb/build.sh +++ b/packages/mariadb/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://mariadb.org TERMUX_PKG_DESCRIPTION="A drop-in replacement for mysql server" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=2:10.5.5 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-${TERMUX_PKG_VERSION:2}/source/mariadb-${TERMUX_PKG_VERSION:2}.tar.gz TERMUX_PKG_SHA256=cf6b2c061754c07bbb1d20b29ae111bf2d098297c9b8c321b810638a179088a4 TERMUX_PKG_DEPENDS="libc++, libiconv, liblzma, ncurses, libedit, openssl, pcre2, libcrypt, libandroid-support, libandroid-glob, zlib, liblz4" diff --git a/packages/mariadb/my_rdtsc.h.patch b/packages/mariadb/my_rdtsc.h.patch new file mode 100644 index 000000000..54e57eed8 --- /dev/null +++ b/packages/mariadb/my_rdtsc.h.patch @@ -0,0 +1,23 @@ +!!! FIX FOR https://github.com/termux/termux-packages/issues/4319 !!! +--------------------------------------------------------------------------------- +diff -uNr mariadb-10.5.5/include/my_rdtsc.h mariadb-10.5.5.mod/include/my_rdtsc.h +--- mariadb-10.5.5/include/my_rdtsc.h 2020-08-07 15:57:35.000000000 +0300 ++++ mariadb-10.5.5.mod/include/my_rdtsc.h 2020-08-29 23:55:38.206355189 +0300 +@@ -26,7 +26,7 @@ + # ifndef __has_builtin + # define __has_builtin(x) 0 /* Compatibility with non-clang compilers */ + # endif +-# if __has_builtin(__builtin_readcyclecounter) ++# if __has_builtin(__builtin_readcyclecounter) && !defined(__ANDROID__) + # elif defined _WIN32 + # include + # elif defined __i386__ || defined __x86_64__ +@@ -128,7 +128,7 @@ + */ + static inline ulonglong my_timer_cycles(void) + { +-# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) ++# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) && !defined(__ANDROID__) + return __builtin_readcyclecounter(); + # elif defined _WIN32 || defined __i386__ || defined __x86_64__ + return __rdtsc();