From 428e0e292be4d6b41af9db893a97e90cc1730e4e Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Thu, 9 Apr 2026 10:42:46 +0200 Subject: [PATCH] package/c-icap: fix musl build Fixes: https://autobuild.buildroot.net/results/33b/33bb3ea8ac36da7f40a82c580d3614f0b34a7ab2/ The oldest build error dates back to June 2024 so this patch should be backported to LTS branches. Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- ...ting-in-various-printf-to-avoid-warn.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch diff --git a/package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch b/package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch new file mode 100644 index 0000000000..7183efa46f --- /dev/null +++ b/package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch @@ -0,0 +1,47 @@ +From 8ef8966237865ec699ab16d208ff56edaac4ff7b Mon Sep 17 00:00:00 2001 +From: Christos Tsantilas +Date: Fri, 1 Nov 2019 08:00:52 -0700 +Subject: [PATCH] Fix integer printing in various printf to avoid warnings + about integer sizes + +Upstream: https://github.com/c-icap/c-icap-server/commit/8ef8966237865ec699ab16d208ff56edaac4ff7b + +[Bernd: partially backported to 0.5.10] +Signed-off-by: Bernd Kuhls +--- + mpmt_server.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mpmt_server.c b/mpmt_server.c +index a30d55d4..9b178a66 100644 +--- a/mpmt_server.c ++++ b/mpmt_server.c +@@ -74,7 +74,7 @@ typedef struct server_decl { + + ci_thread_mutex_t threads_list_mtx; + server_decl_t **threads_list = NULL; +-ci_thread_t listener_thread_id = -1; ++ci_thread_t listener_thread_id; + int listener_running = 0; + + ci_thread_cond_t free_server_cond; +@@ -242,8 +242,8 @@ static void cancel_all_threads() + for (i=0; irunning) { /*if the i thread is not running any more*/ +- ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n", +- threads_list[i]->srv_id, threads_list[i]->srv_pthread, ++ ci_debug_printf(5, "Cancel server %" PRIu64 ", thread_id %" PRIu64 " (%d)\n", ++ (uint64_t)threads_list[i]->srv_id, (uint64_t)threads_list[i]->srv_pthread, + i); + ci_thread_join(threads_list[i]->srv_pthread); + release_thread_i(i); +@@ -252,7 +252,7 @@ static void cancel_all_threads() + /*The thread is still running, and we have a timeout for waiting + the thread to exit. */ + if (wait_for_workers <= 2) { +- ci_debug_printf(5, "Thread %ld still running near the timeout. Try to kill it\n", threads_list[i]->srv_pthread); ++ ci_debug_printf(5, "Thread %" PRIu64 " still running near the timeout. Try to kill it\n", (uint64_t)threads_list[i]->srv_pthread); + pthread_kill( threads_list[i]->srv_pthread, SIGTERM); + } + }