diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-11-14 14:39:28 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-11-15 12:25:53 -0800 |
commit | 512712f9c4b5eb4f9a1280fe7dbe06089e547ac3 (patch) | |
tree | 5ef752ffde73caa0f96c11e7dfe85181ec024bb4 | |
parent | 1dfa5d990b8f6e06db5adcb477af2f8664d1d7a0 (diff) | |
download | meta-openembedded-512712f9c4b5eb4f9a1280fe7dbe06089e547ac3.tar.gz |
mariadb: Fix build on 32bit arches with 64bit time_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb.inc | 1 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 7c92bbaad..e3ce29761 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc | |||
@@ -19,6 +19,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz | |||
19 | file://clang_version_header_conflict.patch \ | 19 | file://clang_version_header_conflict.patch \ |
20 | file://fix-arm-atomic.patch \ | 20 | file://fix-arm-atomic.patch \ |
21 | file://0001-Fix-library-LZ4-lookup.patch \ | 21 | file://0001-Fix-library-LZ4-lookup.patch \ |
22 | file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ | ||
22 | " | 23 | " |
23 | SRC_URI[sha256sum] = "ff05dd69e9f6992caf1053242db704f04eda6f9accbcc98b74edfaf6013c45c4" | 24 | SRC_URI[sha256sum] = "ff05dd69e9f6992caf1053242db704f04eda6f9accbcc98b74edfaf6013c45c4" |
24 | 25 | ||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch new file mode 100644 index 000000000..0a2eed44f --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From d611f78198dee64bb6a05933d200b544e2510b76 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 14 Nov 2020 14:37:13 -0800 | ||
4 | Subject: [PATCH] innobase: Define __NR_futex if it does not exist | ||
5 | |||
6 | __NR_futex is not defines by newer architectures e.g. arc, riscv32 as | ||
7 | they only have 64bit variant of time_t. Glibc defines SYS_futex interface based | ||
8 | on | ||
9 | __NR_futex, since this is used in applications, such applications start | ||
10 | to fail to build for these newer architectures. This patch defines a | ||
11 | fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps | ||
12 | working | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | storage/innobase/log/log0sync.cc | 3 +++ | ||
19 | 1 file changed, 3 insertions(+) | ||
20 | |||
21 | diff --git a/storage/innobase/log/log0sync.cc b/storage/innobase/log/log0sync.cc | ||
22 | index 7799e605..4fab8f74 100644 | ||
23 | --- a/storage/innobase/log/log0sync.cc | ||
24 | +++ b/storage/innobase/log/log0sync.cc | ||
25 | @@ -66,6 +66,9 @@ Note that if write operation is very fast, a) or b) can be fine as alternative. | ||
26 | #ifdef __linux__ | ||
27 | #include <linux/futex.h> | ||
28 | #include <sys/syscall.h> | ||
29 | +#if !defined(SYS_futex) && defined(SYS_futex_time64) | ||
30 | +# define SYS_futex SYS_futex_time64 | ||
31 | +#endif | ||
32 | #endif | ||
33 | |||
34 | #include <atomic> | ||
35 | -- | ||
36 | 2.29.2 | ||
37 | |||