From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:08:00 +0000 (+0000) Subject: sessiond: relay_session: use lttng::utils::container_of X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=356f96bdc7aaacc0a8a57c101156118b8318dc8f;p=lttng-tools.git sessiond: relay_session: 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: I0fb69c7132665ea0ee3067445884ec1115ba9872 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/session.cpp b/src/bin/lttng-relayd/session.cpp index c199efcd1..06dcbf2a8 100644 --- a/src/bin/lttng-relayd/session.cpp +++ b/src/bin/lttng-relayd/session.cpp @@ -559,7 +559,7 @@ end: static void rcu_destroy_session(struct rcu_head *rcu_head) { - struct relay_session *session = caa_container_of(rcu_head, struct relay_session, rcu_node); + auto *session = lttng::utils::container_of(rcu_head, &relay_session::rcu_node); /* * Since each trace has a reference on the session, it means * that if we are at the point where we teardown the session, no