git: 34791f4ac79e - main - capsicum.h: Include ktrace.h only in kernel

From: Jake Freeland <jfree_at_FreeBSD.org>
Date: Mon, 08 Apr 2024 14:46:54 UTC
The branch main has been updated by jfree:

URL: https://cgit.FreeBSD.org/src/commit/?id=34791f4ac79ee41f6986178a3a89d13f37ac156c

commit 34791f4ac79ee41f6986178a3a89d13f37ac156c
Author:     Jake Freeland <jfree@FreeBSD.org>
AuthorDate: 2024-04-08 13:27:17 +0000
Commit:     Jake Freeland <jfree@FreeBSD.org>
CommitDate: 2024-04-08 14:32:58 +0000

    capsicum.h: Include ktrace.h only in kernel
    
    Fix cross build failure by including ktrace.h only when _KERNEL is
    defined.
    
    Fixes:          9bec84131215
    Approved by:    markj (mentor)
    MFC after:      1 month
    Sponsored by:   The FreeBSD Foundation
---
 sys/sys/capsicum.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h
index e1113f590b85..5c6813d2a450 100644
--- a/sys/sys/capsicum.h
+++ b/sys/sys/capsicum.h
@@ -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)