path: root/include/linux/netlink.h
diff options
authorOllie Wild <aaw@google.com>2010-09-22 05:54:54 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-22 13:21:05 -0700
commit56b49f4b8f6728b91d10c556c116175051b77b60 (patch)
tree2a88008075a90686237b0e8ce1de72db1d5b0747 /include/linux/netlink.h
parentnetfilter: nf_conntrack_defrag: check socket type before touching nodefrag flag (diff)
net: Move "struct net" declaration inside the __KERNEL__ macro guard
This patch reduces namespace pollution by moving the "struct net" declaration out of the userspace-facing portion of linux/netlink.h. It has no impact on the kernel. (This came up because we have several C++ applications which use "net" as a namespace name.) Signed-off-by: Ollie Wild <aaw@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 59d066936ab9..123566912d73 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -27,8 +27,6 @@
#define MAX_LINKS 32
-struct net;
struct sockaddr_nl {
sa_family_t nl_family; /* AF_NETLINK */
unsigned short nl_pad; /* zero */
@@ -151,6 +149,8 @@ struct nlattr {
#include <linux/capability.h>
#include <linux/skbuff.h>
+struct net;
static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
return (struct nlmsghdr *)skb->data;