Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2023 22:11:42 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 655fe04370ad - stable/13 - netlink: make test-includes happy by hiding most of the header  contents under _KERNEL.
Message-ID:  <202301232211.30NMBg3U012425@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=655fe04370ad9c1b20f2715662fa925db434e55b

commit 655fe04370ad9c1b20f2715662fa925db434e55b
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-10-01 17:01:53 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-01-23 22:04:01 +0000

    netlink: make test-includes happy by hiding most of the header
     contents under _KERNEL.
    
    (cherry picked from commit dddafa8d25c6ba57c64c0363d8a4791470d465e0)
---
 sys/netlink/netlink_ctl.h            | 2 ++
 sys/netlink/netlink_debug.h          | 3 +++
 sys/netlink/netlink_generic.h        | 2 ++
 sys/netlink/netlink_message_parser.h | 2 ++
 sys/netlink/netlink_message_writer.h | 2 ++
 sys/netlink/netlink_var.h            | 3 +++
 6 files changed, 14 insertions(+)

diff --git a/sys/netlink/netlink_ctl.h b/sys/netlink/netlink_ctl.h
index fb5a8b30e0aa..1310a5a5493a 100644
--- a/sys/netlink/netlink_ctl.h
+++ b/sys/netlink/netlink_ctl.h
@@ -28,6 +28,7 @@
 #ifndef _NETLINK_NETLINK_CTL_H_
 #define _NETLINK_NETLINK_CTL_H_
 
+#ifdef _KERNEL
 /*
  * This file provides headers for the public KPI of the netlink
  * subsystem
@@ -100,3 +101,4 @@ uint32_t genl_register_group(const char *family_name, const char *group_name);
 uint32_t nlp_get_pid(const struct nlpcb *nlp);
 
 #endif
+#endif
diff --git a/sys/netlink/netlink_debug.h b/sys/netlink/netlink_debug.h
index 6ff6811c6a5a..5d8fe0352a79 100644
--- a/sys/netlink/netlink_debug.h
+++ b/sys/netlink/netlink_debug.h
@@ -31,6 +31,8 @@
 #ifndef _NETLINK_NETLINK_DEBUG_H_
 #define	_NETLINK_NETLINK_DEBUG_H_
 
+#ifdef _KERNEL
+
 #define	_DEBUG_SYSCTL_OID	_net_netlink_debug
 #include <net/route/route_debug.h>
 
@@ -79,4 +81,5 @@ SYSCTL_DECL(_net_netlink_debug);
 
 
 
+#endif
 #endif
diff --git a/sys/netlink/netlink_generic.h b/sys/netlink/netlink_generic.h
index 9b411a67ab2a..f88b6b5f5429 100644
--- a/sys/netlink/netlink_generic.h
+++ b/sys/netlink/netlink_generic.h
@@ -31,6 +31,8 @@
 #ifndef _NETLINK_NETLINK_GENERIC_H_
 #define	_NETLINK_NETLINK_GENERIC_H_
 
+#include <netlink/netlink.h>
+
 /* Base header for all of the relevant messages */
 struct genlmsghdr {
 	uint8_t		cmd;		/* CTRL_CMD_ */
diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h
index 06a6788b7de5..2f802b0961ad 100644
--- a/sys/netlink/netlink_message_parser.h
+++ b/sys/netlink/netlink_message_parser.h
@@ -28,6 +28,7 @@
 #ifndef _NETLINK_NETLINK_MESSAGE_PARSER_H_
 #define _NETLINK_NETLINK_MESSAGE_PARSER_H_
 
+#ifdef _KERNEL
 /*
  * It is not meant to be included directly
  */
@@ -268,3 +269,4 @@ nl_parse_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser,
 }
 
 #endif
+#endif
diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h
index 95f6dd8e6da0..424983282e59 100644
--- a/sys/netlink/netlink_message_writer.h
+++ b/sys/netlink/netlink_message_writer.h
@@ -29,6 +29,7 @@
 #ifndef _NETLINK_NETLINK_MESSAGE_WRITER_H_
 #define _NETLINK_NETLINK_MESSAGE_WRITER_H_
 
+#ifdef _KERNEL
 /*
  * It is not meant to be included directly
  */
@@ -248,3 +249,4 @@ nlattr_add_string(struct nl_writer *nw, int attrtype, const char *str)
 
 
 #endif
+#endif
diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h
index 40d3870fd795..130f3d40a1a3 100644
--- a/sys/netlink/netlink_var.h
+++ b/sys/netlink/netlink_var.h
@@ -28,6 +28,8 @@
 #ifndef _NETLINK_NETLINK_VAR_H_
 #define _NETLINK_NETLINK_VAR_H_
 
+#ifdef _KERNEL
+
 #include <sys/ck.h>
 #include <sys/epoch.h>
 #include <sys/sysctl.h>
@@ -140,3 +142,4 @@ int nl_receive_async(struct mbuf *m, struct socket *so);
 void nl_process_receive_locked(struct nlpcb *nlp);
 
 #endif
+#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301232211.30NMBg3U012425>