From 11905a0b4e78b13959f89629568ffeb4786f912a Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 4 Jan 2023 15:56:31 -0500 Subject: [PATCH] ifnet: Expose if_t to userspace should be a kernel-only header, but it's included elsewhere. Until that's addressed expose if_t to userspace to fix the build. Fixes: be4315dcbb8 Sponsored by: Juniper Networks, Inc. --- sys/net/if.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/if.h b/sys/net/if.h index 85c217a888bd..888e7d5d7320 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -651,18 +651,18 @@ struct ifdownreason { #endif /* __BSD_VISIBLE */ -#ifdef _KERNEL -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_IFADDR); -MALLOC_DECLARE(M_IFMADDR); -#endif - /* * Opaque interface structure. */ typedef struct ifnet * if_t; +#ifdef _KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_IFADDR); +MALLOC_DECLARE(M_IFMADDR); +#endif + extern struct sx ifnet_detach_sxlock; struct nvlist;