Skip to content

Commit

Permalink
[NET]: Protect device namespace inlines with CONFIG_NET
Browse files Browse the repository at this point in the history
Include sites should not be bothered by whether
CONFIG_NET is set or not when trying to include
benign files like linux/etherdevice.h et al.

From a report by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 28, 2008
1 parent 0736ffc commit 1567ca7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ struct net_device
#define NETDEV_ALIGN 32
#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)

#ifdef CONFIG_NET
/*
* Net namespace inlines
*/
Expand All @@ -761,6 +762,7 @@ void dev_net_set(struct net_device *dev, struct net *net)
dev->nd_net = net;
#endif
}
#endif

/**
* netdev_priv - access network device private data
Expand Down

0 comments on commit 1567ca7

Please sign in to comment.