From 54606590dffcd23136af1c26da38206f4d3a6269 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 9 Feb 2023 13:11:34 +0100 Subject: [PATCH] linuxkpi: Move definition of `struct list_head` to This is the case on Linux. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38537 --- sys/compat/linuxkpi/common/include/linux/list.h | 8 -------- sys/compat/linuxkpi/common/include/linux/types.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 6ec71529180..46da7cc7bc8 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -86,14 +86,6 @@ #define LINUX_LIST_HEAD(name) \ struct list_head name = LINUX_LIST_HEAD_INIT(name) -#ifndef LIST_HEAD_DEF -#define LIST_HEAD_DEF -struct list_head { - struct list_head *next; - struct list_head *prev; -}; -#endif - static inline void INIT_LIST_HEAD(struct list_head *list) { diff --git a/sys/compat/linuxkpi/common/include/linux/types.h b/sys/compat/linuxkpi/common/include/linux/types.h index dab5e6ddce4..aa19163ddd2 100644 --- a/sys/compat/linuxkpi/common/include/linux/types.h +++ b/sys/compat/linuxkpi/common/include/linux/types.h @@ -79,6 +79,14 @@ typedef unsigned long kernel_ulong_t; typedef unsigned long irq_hw_number_t; +#ifndef LIST_HEAD_DEF +#define LIST_HEAD_DEF +struct list_head { + struct list_head *next; + struct list_head *prev; +}; +#endif + struct rcu_head { void *raw[2]; } __aligned(sizeof(void *)); -- 2.45.0