relayd: offsetof conditionally supported for non-POD types
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 19:02:49 +0000 (19:02 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:51 +0000 (01:26 +0000)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/index.cpp

index 87ed2d5d25af023e80b01ccfce53bc93cefdb1a5..42d4bc31140562dd94ad8bedbf33b0eb3bb08012 100644 (file)
@@ -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;
        }
This page took 0.025028 seconds and 4 git commands to generate.