diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-28 18:53:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-28 18:53:11 -0400 |
commit | 1567ca7eec7664b8be3b07755ac59dc1b1ec76cb (patch) | |
tree | 8df2dcce884a6fee6d6cdb87ca9d3d7ad8b23675 /include/linux/netdevice.h | |
parent | 0736ffc04eec239cce9fd3c6ae5dce54e14c25c7 (diff) |
[NET]: Protect device namespace inlines with CONFIG_NET
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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3b54f8a2c055..8576ca928dae 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -741,6 +741,7 @@ struct net_device | |||
741 | #define NETDEV_ALIGN 32 | 741 | #define NETDEV_ALIGN 32 |
742 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 742 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
743 | 743 | ||
744 | #ifdef CONFIG_NET | ||
744 | /* | 745 | /* |
745 | * Net namespace inlines | 746 | * Net namespace inlines |
746 | */ | 747 | */ |
@@ -761,6 +762,7 @@ void dev_net_set(struct net_device *dev, struct net *net) | |||
761 | dev->nd_net = net; | 762 | dev->nd_net = net; |
762 | #endif | 763 | #endif |
763 | } | 764 | } |
765 | #endif | ||
764 | 766 | ||
765 | /** | 767 | /** |
766 | * netdev_priv - access network device private data | 768 | * netdev_priv - access network device private data |