Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56b49f4b authored by Ollie Wild's avatar Ollie Wild Committed by David S. Miller
Browse files

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: default avatarOllie Wild <aaw@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbdd769a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;