From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:02:49 +0000 (+0000) Subject: relayd: offsetof conditionally supported for non-POD types X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=efff93c5f0b2b14afe255d9703bdc3f41f278170;p=lttng-tools.git relayd: offsetof conditionally supported for non-POD types caa_container_of makes use of offsetof which is conditionally supported for non-POD types. Replace its use by lttng_ht_node_container_of. Change-Id: If2f19ab1aba8c59cf9ca2e0d5b815a396512b2d9 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/index.cpp b/src/bin/lttng-relayd/index.cpp index 87ed2d5d2..42d4bc311 100644 --- a/src/bin/lttng-relayd/index.cpp +++ b/src/bin/lttng-relayd/index.cpp @@ -80,7 +80,7 @@ static struct relay_index *relay_index_add_unique(struct relay_stream *stream, &index->index_n.key, &index->index_n.node); if (node_ptr != &index->index_n.node) { - _index = caa_container_of(node_ptr, struct relay_index, index_n.node); + _index = lttng_ht_node_container_of(node_ptr, &relay_index::index_n); } else { _index = nullptr; }