mariadb: actually fix the my_safe_print_str error properly

this is not cross-related
This commit is contained in:
q66 2021-02-11 13:56:33 +01:00
parent b38ff94056
commit e459ed4622
2 changed files with 21 additions and 4 deletions

View file

@ -0,0 +1,21 @@
https://jira.mariadb.org/browse/MDEV-24131
diff --git a/unittest/mysys/stacktrace-t.c b/unittest/mysys/stacktrace-t.c
index 8fa0db15b36..67eb099028e 100644
--- unittest/mysys/stacktrace-t.c
+++ unittest/mysys/stacktrace-t.c
@@ -22,6 +22,14 @@
char b_bss[10];
+#ifndef HAVE_STACKTRACE
+int my_safe_print_str(const char* val, size_t max_len)
+{
+ printf("%*s\n", (int) max_len, val);
+ return 0;
+}
+#endif
+
void test_my_safe_print_str()
{
char b_stack[10];

View file

@ -36,10 +36,6 @@ system_accounts="mysql"
mysql_homedir="/var/lib/mysql"
CFLAGS="-w -fcommon"
if [ "$CROSS_BUILD" ]; then
configure_args+=" -DWITH_UNIT_TESTS=OFF"
fi
pre_configure() {
# We need some host binaries before starting cross compilation.
if [ "$CROSS_BUILD" ]; then