Skip to content

Commit 115034b

Browse files
Fix the build on RHEL-9. (#98)
* Fix the build on RHEL-9. It turns out that in the older version of lttng-ust on RHEL-9, the API to set a marker is spelled _lttng_ust_tracef. Include the correct version header file, and use the correct API called depending on what version we are using. Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
1 parent dfeb3d1 commit 115034b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test_tracetools/src/mark_process.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#ifndef TRACETOOLS_DISABLED
1616
#include <lttng/tracef.h>
17+
#include <lttng/ust-version.h>
1718

1819
#include "rcpputils/env.hpp"
1920
#endif // TRACETOOLS_DISABLED
@@ -40,7 +41,11 @@ void mark_trace_test_process()
4041
const std::string env_var{trace_test_id_env_var};
4142
const auto test_id = rcpputils::get_env_var(env_var.c_str());
4243
if (!test_id.empty()) {
44+
#if LTTNG_UST_MINOR_VERSION <= 12
45+
_lttng_ust_tracef("%s=%s", env_var.c_str(), test_id.c_str());
46+
#else
4347
lttng_ust__tracef("%s=%s", env_var.c_str(), test_id.c_str());
48+
#endif
4449
}
4550
#endif // TRACETOOLS_DISABLED
4651
}

0 commit comments

Comments
 (0)