diff --git a/packages/databases/mariadb-connector-c/package.mk b/packages/databases/mariadb-connector-c/package.mk index 51701d6420..f77ec39aa7 100644 --- a/packages/databases/mariadb-connector-c/package.mk +++ b/packages/databases/mariadb-connector-c/package.mk @@ -2,8 +2,8 @@ # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) PKG_NAME="mariadb-connector-c" -PKG_VERSION="3.3.10" -PKG_SHA256="0a79088af2fbde4dbe6655dbc51bbb272b606c0d9116745697e08879e70198a7" +PKG_VERSION="3.4.0" +PKG_SHA256="23efc2da9c50d71dc0bb4f25c07f9437d5b8e2b0cbd529091a83d00ccf3f6d20" PKG_LICENSE="LGPL" PKG_SITE="https://mariadb.org/" PKG_URL="https://github.com/mariadb-corporation/mariadb-connector-c/archive/v${PKG_VERSION}.tar.gz" diff --git a/packages/databases/mariadb-connector-c/patches/pr247-fix-calloc-errors-as-warnings-when-compiling-with-gcc.patch b/packages/databases/mariadb-connector-c/patches/pr247-fix-calloc-errors-as-warnings-when-compiling-with-gcc.patch new file mode 100644 index 0000000000..df2d7b043e --- /dev/null +++ b/packages/databases/mariadb-connector-c/patches/pr247-fix-calloc-errors-as-warnings-when-compiling-with-gcc.patch @@ -0,0 +1,53 @@ +From 55631533d134d791ce12af9ab8acb2be39e5d22c Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Mon, 3 Jun 2024 07:57:30 +0000 +Subject: [PATCH] fix calloc errors as warnings when compiling with gcc-14.1.0 + +error: 'calloc' sizes specified with 'sizeof' in the earlier argument + and not in the later argument [-Werror=calloc-transposed-args] +note: earlier argument should specify number of elements, later size + of each element +--- + unittest/libmariadb/bulk1.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/unittest/libmariadb/bulk1.c b/unittest/libmariadb/bulk1.c +index 56ae20d8..1f28153c 100644 +--- a/unittest/libmariadb/bulk1.c ++++ b/unittest/libmariadb/bulk1.c +@@ -723,7 +723,7 @@ static int test_char_conv2(MYSQL *mysql) + return SKIP; + + stmt= mysql_stmt_init(mysql); +- buffer[0]= calloc(1, 7); ++ buffer[0]= calloc(7, 1); + strcpy (buffer[0], "\xC3\x82\xC3\x83\xC3\x84\x00"); + + rc= mysql_query(mysql, "SET NAMES UTF8"); +@@ -1126,7 +1126,7 @@ static int bulk_with_unit_result_insert(MYSQL *my) + + /* allocate memory */ + buffer= calloc(TEST_ARRAY_SIZE, sizeof(char *)); +- lengths= (unsigned long *)calloc(sizeof(long), TEST_ARRAY_SIZE); ++ lengths= (unsigned long *)calloc(TEST_ARRAY_SIZE, sizeof(long)); + + for (i=0; i < TEST_ARRAY_SIZE; i++) + { +@@ -1251,7 +1251,7 @@ static int bulk_with_unit_result_delete(MYSQL *my) + rc= mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size); + check_stmt_rc(rc, stmt); + +- vals= (unsigned int *)calloc(sizeof(int), 5); ++ vals= (unsigned int *)calloc(5, sizeof(int)); + memset(bind, 0, sizeof(MYSQL_BIND) * 1); + bind[0].buffer_type= MYSQL_TYPE_LONG; + bind[0].buffer= vals; +@@ -1359,7 +1359,7 @@ static int bulk_with_unit_result_update(MYSQL *my) + rc= mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &array_size); + check_stmt_rc(rc, stmt); + +- vals= (unsigned int *)calloc(sizeof(int), 5); ++ vals= (unsigned int *)calloc(5, sizeof(int)); + memset(bind, 0, sizeof(MYSQL_BIND) * 1); + bind[0].buffer_type= MYSQL_TYPE_LONG; + bind[0].buffer= vals;