capsicum.h: Include ktrace.h only in kernel

Fix cross build failure by including ktrace.h only when _KERNEL is
defined.

Fixes:		9bec841312
Approved by:	markj (mentor)
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Jake Freeland 2024-04-08 08:27:17 -05:00
parent b6c7ff583f
commit 34791f4ac7

View file

@ -44,7 +44,6 @@
#include <sys/caprights.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/ktrace.h>
#ifndef _KERNEL
#include <stdbool.h>
@ -419,6 +418,7 @@ __END_DECLS
#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/ktrace.h>
#ifdef KTRACE
#define CAP_TRACING(td) KTRPOINT((td), KTR_CAPFAIL)