From 1176fd49ed4530ba0001b9f022e2ff751a722ca8 Mon Sep 17 00:00:00 2001 From: Youzhong Yang Date: Tue, 18 Jun 2024 10:48:16 -0400 Subject: [PATCH] Make sure avl_tree.avl_pad is not in kernel module The commit b192a2c (Remove avl_size field from struct avl_tree) uses a def _KERNEL to decide to include avl_pad or not, but this _KERNEL is defined in sys/sysmacros.h. If avl.h and sysmacros.h are not included in the right order, it can cause a headache when working on a zfs related kernel module. Add sysmacros.h in avl_impl.h to fix. sysmacros.h is also removed from spa.h as it's reduntant. Signed-off-by: Youzhong Yang --- include/sys/avl_impl.h | 1 + include/sys/spa.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/avl_impl.h b/include/sys/avl_impl.h index 85277b42b4..b2b4eb4bce 100644 --- a/include/sys/avl_impl.h +++ b/include/sys/avl_impl.h @@ -34,6 +34,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/sys/spa.h b/include/sys/spa.h index 3073c4d1b9..f50cb5e04e 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -35,11 +35,10 @@ #ifndef _SYS_SPA_H #define _SYS_SPA_H -#include #include +#include #include #include -#include #include #include #include