From 38d89f57f0771d3cc7b2ab70849584685ada2bc0 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 21 Feb 2025 16:47:34 +0100 Subject: [PATCH] charon-nm: Use CALLBACK macro for callback job's cancel implementation Casting to this specific function type doesn't work anymore if C23 is used as the types mismatch. --- src/charon-nm/nm/nm_backend.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/charon-nm/nm/nm_backend.c b/src/charon-nm/nm/nm_backend.c index aefd3f9568..8ee1785212 100644 --- a/src/charon-nm/nm/nm_backend.c +++ b/src/charon-nm/nm/nm_backend.c @@ -78,7 +78,8 @@ static job_requeue_t run(nm_backend_t *this) /** * Cancel the GLib Main Event Loop */ -static bool cancel(nm_backend_t *this) +CALLBACK(cancel, bool, + nm_backend_t *this) { if (this->loop) { @@ -152,7 +153,7 @@ static bool nm_backend_init() lib->processor->queue_job(lib->processor, (job_t*)callback_job_create_with_prio((callback_job_cb_t)run, this, - NULL, (callback_job_cancel_t)cancel, JOB_PRIO_CRITICAL)); + NULL, cancel, JOB_PRIO_CRITICAL)); return TRUE; } -- 2.47.2