This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 52a124bcd5 Fix tsapi build with ENABLE_PROBES=ON (#13276)
52a124bcd5 is described below
commit 52a124bcd543f6889ba26af582a9d9927b7f7e6e
Author: Robert Clendenin <[email protected]>
AuthorDate: Tue Jun 16 10:15:35 2026 -0500
Fix tsapi build with ENABLE_PROBES=ON (#13276)
Cache headers transitively pull in <ts/ats_probe.h> via P_CacheDir.h.
When ENABLE_PROBES=ON, ENABLE_SYSTEMTAP_PROBES is defined and
ats_probe.h `#include <sys/sdt.h>`. tsapi's include path didn't have
lib/systemtap, so the build failed.
Mirror what tscore already does (src/tscore/CMakeLists.txt:110), gated
on ENABLE_PROBES so the dependency only attaches when probes are
actually enabled.
---
src/api/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt
index 642f868d48..ca3ea34486 100644
--- a/src/api/CMakeLists.txt
+++ b/src/api/CMakeLists.txt
@@ -28,6 +28,9 @@ set(TSAPI_PUBLIC_HEADERS
${PROJECT_SOURCE_DIR}/include/ts/ts.h ${PROJECT_SOURCE_
# OpenSSL needs to be listed in before other libraries that can be found in
the system default lib directory (See #11511)
target_link_libraries(tsapi PRIVATE libswoc::libswoc yaml-cpp::yaml-cpp
OpenSSL::SSL)
+if(ENABLE_PROBES)
+ target_link_libraries(tsapi PRIVATE systemtap::systemtap)
+endif()
set_target_properties(tsapi PROPERTIES PUBLIC_HEADER "${TSAPI_PUBLIC_HEADERS}")
# Items common between api and other ts libraries