aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/syd-trace-freebsd.c2
-rw-r--r--tests/unit/test-trace-freebsd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/syd-trace-freebsd.c b/src/syd-trace-freebsd.c
index 9072b58..6407596 100644
--- a/src/syd-trace-freebsd.c
+++ b/src/syd-trace-freebsd.c
@@ -84,7 +84,7 @@ int trace_kill(pid_t pid)
{
int save_errno;
- if (G_UNLIKELY(0 > ptrace(PT_KILL, pid, NULL, 0) && ESRCH != errno)) {
+ if (G_UNLIKELY(0 > ptrace(PT_KILL, pid, (caddr_t)1, 0) && ESRCH != errno)) {
save_errno = errno;
g_info("failed to kill child %i: %s", pid, g_strerror(errno));
errno = save_errno;
diff --git a/tests/unit/test-trace-freebsd.c b/tests/unit/test-trace-freebsd.c
index 5df3887..a477a0b 100644
--- a/tests/unit/test-trace-freebsd.c
+++ b/tests/unit/test-trace-freebsd.c
@@ -242,7 +242,7 @@ static void test7(void)
/* Check the system call number */
XFAIL_IF(0 > trace_get_syscall(pid, &sno), "failed to get system call: %s\n", g_strerror(errno));
- XFAIL_UNLESS(SYS_getpid == sno, "expected 0xbadca11, got %d\n", sno);
+ XFAIL_UNLESS(0xbadca11 == sno, "expected 0xbadca11, got %d\n", sno);
trace_kill(pid);
}