This is an automated email from the ASF dual-hosted git repository.
eze pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new 5826f369f2 Cherry-pick of #12002 (#12499)
5826f369f2 is described below
commit 5826f369f2dc022342b761312d44e7abe8667d7d
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Thu Sep 11 12:24:19 2025 -0600
Cherry-pick of #12002 (#12499)
commit #0019d04d3896401fdc38879de5fb37647aeda844
---
mgmt/api/CoreAPI.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/mgmt/api/CoreAPI.cc b/mgmt/api/CoreAPI.cc
index 35cd826777..7d55a201f8 100644
--- a/mgmt/api/CoreAPI.cc
+++ b/mgmt/api/CoreAPI.cc
@@ -49,6 +49,16 @@
#include "tscore/I_Layout.h"
#include "tscore/ink_cap.h"
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#define __WALL P_ALL
+#define PTRACE_ATTACH PT_ATTACH
+#define PTRACE_DETACH PT_DETACH
+#define DATA_NULL 0
+#else
+#define DATA_NULL NULL
+#endif
+
// global variable
static CallbackTable *local_event_callbacks;
@@ -327,7 +337,7 @@ done:
_UPT_destroy(ap);
}
- status = ptrace(PTRACE_DETACH, target, NULL, NULL);
+ status = ptrace(PTRACE_DETACH, target, NULL, DATA_NULL);
Debug("backtrace", "ptrace(DETACH, %ld) -> %d (errno %d)", (long)target,
status, errno);
}