Skip to content

Commit

Permalink
Fix the build on RHEL-9. (#98)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
clalancette and fujitatomoya authored Mar 21, 2024
1 parent dfeb3d1 commit 115034b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test_tracetools/src/mark_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#ifndef TRACETOOLS_DISABLED
#include <lttng/tracef.h>
#include <lttng/ust-version.h>

#include "rcpputils/env.hpp"
#endif // TRACETOOLS_DISABLED
Expand All @@ -40,7 +41,11 @@ void mark_trace_test_process()
const std::string env_var{trace_test_id_env_var};
const auto test_id = rcpputils::get_env_var(env_var.c_str());
if (!test_id.empty()) {
#if LTTNG_UST_MINOR_VERSION <= 12
_lttng_ust_tracef("%s=%s", env_var.c_str(), test_id.c_str());
#else
lttng_ust__tracef("%s=%s", env_var.c_str(), test_id.c_str());
#endif
}
#endif // TRACETOOLS_DISABLED
}
Expand Down

0 comments on commit 115034b

Please sign in to comment.