git: ec7358885de0 - main - libkern.h: Make more self-sufficient

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 14 Jun 2024 15:35:06 UTC
The branch main has been updated by imp:

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

commit ec7358885de020711b30114df59f21c6bf042639
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-06-14 14:29:08 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-06-14 15:34:05 +0000

    libkern.h: Make more self-sufficient
    
    libkern.h uses KASSERT, which fails when building in the boot
    loader. This is hacked around in a number of other places, but it's
    easier to just include sys/kassert.h here. Those other hacks still work,
    but are no longer really needed and can be torn down over time.
    
    Reviewed by: emaste
    Sponsored by: Netflix
---
 sys/sys/libkern.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index afdfe7346b28..6dc4bc87c3fe 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -36,6 +36,7 @@
 #ifdef _KERNEL
 #include <sys/systm.h>
 #endif
+#include <sys/kassert.h>
 
 #ifndef	LIBKERN_INLINE
 #define	LIBKERN_INLINE  static __inline