git: 39664f1b7b56 - stable/14 - capsicum.h: Include ktrace.h only in kernel

From: Jake Freeland <jfree_at_FreeBSD.org>
Date: Sun, 12 May 2024 00:08:33 UTC
The branch stable/14 has been updated by jfree:

URL: https://cgit.FreeBSD.org/src/commit/?id=39664f1b7b56332a6a68ac072aaca68f4fd4697b

commit 39664f1b7b56332a6a68ac072aaca68f4fd4697b
Author:     Jake Freeland <jfree@FreeBSD.org>
AuthorDate: 2024-04-08 13:27:17 +0000
Commit:     Jake Freeland <jfree@FreeBSD.org>
CommitDate: 2024-05-11 23:57:44 +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
    
    (cherry picked from commit 34791f4ac79ee41f6986178a3a89d13f37ac156c)
---
 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 05712abf37d1..e2f305462f0d 100644
--- a/sys/sys/capsicum.h
+++ b/sys/sys/capsicum.h
@@ -45,7 +45,6 @@
 #include <sys/caprights.h>
 #include <sys/file.h>
 #include <sys/fcntl.h>
-#include <sys/ktrace.h>
 
 #ifndef _KERNEL
 #include <stdbool.h>
@@ -418,6 +417,7 @@ __END_DECLS
 #ifdef _KERNEL
 
 #include <sys/systm.h>
+#include <sys/ktrace.h>
 
 #ifdef KTRACE
 #define CAP_TRACING(td) KTRPOINT((td), KTR_CAPFAIL)