Skip to content

Commit

Permalink
net: Move "struct net" declaration inside the __KERNEL__ macro guard
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ollie Wild authored and David S. Miller committed Sep 22, 2010
1 parent cbdd769 commit 56b49f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 56b49f4

Please sign in to comment.