diff options
Diffstat (limited to 'meta-oe/recipes-dbs/mysql/mariadb/libfmt_make_fmt.patch')
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/libfmt_make_fmt.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/libfmt_make_fmt.patch b/meta-oe/recipes-dbs/mysql/mariadb/libfmt_make_fmt.patch deleted file mode 100644 index 4d5f4a611b..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/libfmt_make_fmt.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | Make make_arg work with libfmt 10.1+ | ||
2 | |||
3 | This ensures that compiler can find the correct template to use | ||
4 | Fixes | ||
5 | |||
6 | mariadb-10.11.5/sql/item_strfunc.cc:1429:22: error: no matching functi | ||
7 | on for call to 'make_arg' | ||
8 | | 1429 | vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_int()); | ||
9 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
10 | | /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/mariadb/10.11.5/recipe-sysroot/usr/include/fmt/core.h:1588:20: note: candidate functio | ||
11 | n [with Context = fmt::basic_format_context<fmt::appender, char>, T = long long] not viable: expects an lvalue for 1st argument | ||
12 | | 1588 | FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg<Context> { | ||
13 | | | ^ ~~~~~~ | ||
14 | | /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/mariadb/10.11.5/recipe-sysroot/usr/include/fmt/core.h:1559:31: note: candidate templat | ||
15 | e ignored: invalid explicitly-specified argument for template parameter 'PACKED' | ||
16 | | 1559 | FMT_CONSTEXPR FMT_INLINE auto make_arg(T& [ 46%] Building C object mysys/CMakeFiles/mysys.dir/my_likely.c.o | ||
17 | | val) -> value<Context> { | ||
18 | | | ^ | ||
19 | | /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/mariadb/10.11.5/recipe-sysroot/usr/include/fmt/core.h:1596:27: note: candidate templat | ||
20 | e ignored: invalid explicitly-specified argument for template parameter 'PACKED' | ||
21 | | 1596 | FMT_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg<Context> { | ||
22 | | | ^ | ||
23 | |||
24 | Upstream-Status: Pending | ||
25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
26 | |||
27 | --- a/cmake/libfmt.cmake | ||
28 | +++ b/cmake/libfmt.cmake | ||
29 | @@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT) | ||
30 | #include <fmt/format-inl.h> | ||
31 | #include <iostream> | ||
32 | int main() { | ||
33 | + int val = 42; | ||
34 | fmt::format_args::format_arg arg= | ||
35 | - fmt::detail::make_arg<fmt::format_context>(42); | ||
36 | + fmt::detail::make_arg<fmt::format_context>(val); | ||
37 | std::cout << fmt::vformat(\"The answer is {}.\", | ||
38 | fmt::format_args(&arg, 1)); | ||
39 | }" HAVE_SYSTEM_LIBFMT) | ||
40 | --- a/sql/item_strfunc.cc | ||
41 | +++ b/sql/item_strfunc.cc | ||
42 | @@ -1426,14 +1426,22 @@ String *Item_func_sformat::val_str(Strin | ||
43 | switch (args[carg]->result_type()) | ||
44 | { | ||
45 | case INT_RESULT: | ||
46 | - vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_int()); | ||
47 | + int intval; | ||
48 | + intval = args[carg]->val_int(); | ||
49 | + vargs[carg-1]= fmt::detail::make_arg<ctx>(intval); | ||
50 | break; | ||
51 | case DECIMAL_RESULT: // TODO | ||
52 | case REAL_RESULT: | ||
53 | + float fval; | ||
54 | + int val; | ||
55 | if (args[carg]->field_type() == MYSQL_TYPE_FLOAT) | ||
56 | - vargs[carg-1]= fmt::detail::make_arg<ctx>((float)args[carg]->val_real()); | ||
57 | - else | ||
58 | - vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_real()); | ||
59 | + { | ||
60 | + fval = (float)args[carg]->val_real(); | ||
61 | + vargs[carg-1]= fmt::detail::make_arg<ctx>(fval); | ||
62 | + } else { | ||
63 | + val = args[carg]->val_real(); | ||
64 | + vargs[carg-1]= fmt::detail::make_arg<ctx>(val); | ||
65 | + } | ||
66 | break; | ||
67 | case STRING_RESULT: | ||
68 | if (!(parg= args[carg]->val_str(&val_arg[carg-1]))) | ||