On MacOs with the clang linker, the build fails with:
duplicate symbol _bt_ctf_value_null in:
trace-ir/.libs/libtrace-ir.a(trace.o)
trace-ir/.libs/libtrace-ir.a(trace-class.o)
Make the pointers extern.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Change-Id: I679dc5b647de235a19a958331f7f975c0cb0a08f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1267
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
# define bt_ctf_value_freeze(_value)
#endif /* BT_DEV_MODE */
-struct bt_ctf_value *bt_ctf_value_null;
+extern struct bt_ctf_value *const bt_ctf_value_null;
enum bt_ctf_value_type {
/// Null value object.
struct bt_ctf_value;
struct bt_ctf_private_value;
-struct bt_ctf_private_value *bt_ctf_private_value_null;
+extern struct bt_ctf_private_value *const bt_ctf_private_value_null;
static inline
struct bt_ctf_value *bt_ctf_private_value_as_value(
.frozen = BT_TRUE,
};
-struct bt_ctf_value *bt_ctf_value_null = &bt_ctf_value_null_instance;
-struct bt_ctf_private_value *bt_ctf_private_value_null =
+struct bt_ctf_value *const bt_ctf_value_null = &bt_ctf_value_null_instance;
+struct bt_ctf_private_value *const bt_ctf_private_value_null =
(void *) &bt_ctf_value_null_instance;
struct bt_ctf_value_bool {