From 55c854cf0c6aacb60ed88c02522377b1b3fa134d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 5 Nov 2024 03:40:02 +0000 Subject: [PATCH] refcount: Avoid redefining KASSERT for userspace Just bring in systm.h unconditionally. Otherwise this definition of KASSERT conflicts with the one from kassert.h, specifically when including other headers which unconditionally include systm.h or kassert.h. A number of other kernel headers depend on this pollution, but ideally we'd only need kassert.h here. Reported by: Jenkins MFC after: 1 week --- sys/sys/refcount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/sys/refcount.h b/sys/sys/refcount.h index 212e8e516271..44588fe3c812 100644 --- a/sys/sys/refcount.h +++ b/sys/sys/refcount.h @@ -30,11 +30,9 @@ #include -#if defined(_KERNEL) || defined(_STANDALONE) #include -#else +#if !defined(_KERNEL) && !defined(_STANDALONE) #include -#define KASSERT(exp, msg) /* */ #endif #define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0)