From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:56:56 +0000 (+0000) Subject: sessiond: ust_id_tracker_node: use lttng::utils::container_of X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0d731743cd7b587993b4c5a040507ba2929e52be;p=lttng-tools.git sessiond: ust_id_tracker_node: use lttng::utils::container_of caa_container_of makes use of offsetof which is conditionally supported for non-POD types. Replace its use by lttng::utils::container_of. Change-Id: I6c45b7d5138152728f67885ac5cc00ea1bc1603a Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/trace-ust.cpp b/src/bin/lttng-sessiond/trace-ust.cpp index 8937dd205..07e228d61 100644 --- a/src/bin/lttng-sessiond/trace-ust.cpp +++ b/src/bin/lttng-sessiond/trace-ust.cpp @@ -721,8 +721,9 @@ error: static void destroy_id_tracker_node_rcu(struct rcu_head *head) { - struct ust_id_tracker_node *tracker_node = - caa_container_of(head, struct ust_id_tracker_node, node.head); + auto *wrapper_node = lttng::utils::container_of(head, <tng_ht_node_ulong::head); + auto *tracker_node = lttng::utils::container_of(wrapper_node, &ust_id_tracker_node::node); + free(tracker_node); }