git: 11905a0b4e78 - main - ifnet: Expose if_t to userspace
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Jan 2023 21:03:38 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=11905a0b4e78b13959f89629568ffeb4786f912a
commit 11905a0b4e78b13959f89629568ffeb4786f912a
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2023-01-04 20:56:31 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-01-04 21:04:05 +0000
ifnet: Expose if_t to userspace
<net/if_var.h> 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;