summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch
new file mode 100644
index 000000000..3277a3eee
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch
@@ -0,0 +1,22 @@
+ Use SYS_futex for syscall
+
+glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there
+is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/storage/innobase/include/ib0mutex.h
++++ b/storage/innobase/include/ib0mutex.h
+@@ -150,6 +150,12 @@ private:
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
+
++/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and
++ therefore do not define __NR_futex */
++#if !defined(SYS_futex) && defined(SYS_futex_time64)
++# define SYS_futex SYS_futex_time64
++#endif
++
+ /** Mutex implementation that used the Linux futex. */
+ template <template <typename> class Policy>
+ struct TTASFutexMutex {