aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ali Polatel <alip@exherbo.org> 2010-01-16 15:56:21 +0200
committerAvatar Ali Polatel <alip@exherbo.org> 2010-01-16 15:56:21 +0200
commita8ed8ff0d1d009741331a57584f3162b077076f0 (patch)
treeeb2dd622b80e44cc10afa69083e005591c0d24c0
parent8560474e95138666cab40b29bfdccfe07b29df39 (diff)
downloadsydbox-freebsd.tar.gz
sydbox-freebsd.tar.xz
-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);
}