From 0d731743cd7b587993b4c5a040507ba2929e52be Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 22 Jul 2024 19:56:56 +0000 Subject: [PATCH] sessiond: ust_id_tracker_node: use lttng::utils::container_of MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/trace-ust.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.34.1