提交 3edf8fa5 编写于 作者: D David S. Miller

[NET]: Fix allnoconfig build on powerpc and avr32

As reported by Haavard Skinnemoen and Stephen Rothwell:

> allnoconfig fails with
>
> include/linux/netdevice.h:843: error: implicit declaration of function 'dev_net'
>
> which seems to be because the definition of dev_net is inside #ifdef
> CONFIG_NET, while next_net_device, which calls it, is not.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 17eed249
...@@ -827,6 +827,7 @@ struct packet_type { ...@@ -827,6 +827,7 @@ struct packet_type {
extern rwlock_t dev_base_lock; /* Device list lock */ extern rwlock_t dev_base_lock; /* Device list lock */
#ifdef CONFIG_NET
#define for_each_netdev(net, d) \ #define for_each_netdev(net, d) \
list_for_each_entry(d, &(net)->dev_base_head, dev_list) list_for_each_entry(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_safe(net, d, n) \ #define for_each_netdev_safe(net, d, n) \
...@@ -850,6 +851,7 @@ static inline struct net_device *first_net_device(struct net *net) ...@@ -850,6 +851,7 @@ static inline struct net_device *first_net_device(struct net *net)
return list_empty(&net->dev_base_head) ? NULL : return list_empty(&net->dev_base_head) ? NULL :
net_device_entry(net->dev_base_head.next); net_device_entry(net->dev_base_head.next);
} }
#endif
extern int netdev_boot_setup_check(struct net_device *dev); extern int netdev_boot_setup_check(struct net_device *dev);
extern unsigned long netdev_boot_base(const char *prefix, int unit); extern unsigned long netdev_boot_base(const char *prefix, int unit);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册