mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
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 <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 428e0e292b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
b79ab7b812
commit
66a249753e
@@ -0,0 +1,47 @@
|
|||||||
|
From 8ef8966237865ec699ab16d208ff56edaac4ff7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christos Tsantilas <christos@chtsanti.net>
|
||||||
|
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 <bernd@kuhls.net>
|
||||||
|
---
|
||||||
|
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; i<CI_CONF.THREADS_PER_CHILD; i++) {
|
||||||
|
if (threads_list[i] != NULL) { /* if the i thread is still alive*/
|
||||||
|
if (!threads_list[i]->running) { /*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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user