From 870dd915003d84d7d1a4f5ddf5defd3080ee1c4d Mon Sep 17 00:00:00 2001 From: jmmv Date: Mon, 13 Nov 2006 16:57:40 +0000 Subject: [PATCH] Let this build when KTRACE is not enabled. Closes PR kern/33210. --- sys/compat/darwin/darwin_ktrace.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/compat/darwin/darwin_ktrace.c b/sys/compat/darwin/darwin_ktrace.c index f6edccfac74d..20a7bb96cf57 100644 --- a/sys/compat/darwin/darwin_ktrace.c +++ b/sys/compat/darwin/darwin_ktrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_ktrace.c,v 1.6 2006/10/22 18:18:08 christos Exp $ */ +/* $NetBSD: darwin_ktrace.c,v 1.7 2006/11/13 16:57:40 jmmv Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_ktrace.c,v 1.6 2006/10/22 18:18:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_ktrace.c,v 1.7 2006/11/13 16:57:40 jmmv Exp $"); + +#include "opt_ktrace.h" #include #include @@ -59,10 +61,14 @@ __KERNEL_RCSID(0, "$NetBSD: darwin_ktrace.c,v 1.6 2006/10/22 18:18:08 christos E int darwin_sys_utrace(struct lwp *l, void *v, register_t *retval __unused) { +#if defined(KTRACE) struct darwin_sys_utrace_args /* { syscallarg(void *) addr; syscallarg(size_t) len; } */ *uap = v; return ktruser(l, "darwin", SCARG(uap, addr), SCARG(uap, len), 0); +#else + return 0; +#endif }