Skip to content

Commit 3edf8fa

Browse files
committed
[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: David S. Miller <davem@davemloft.net>
1 parent 17eed24 commit 3edf8fa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/linux/netdevice.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ struct packet_type {
827827
extern rwlock_t dev_base_lock; /* Device list lock */
828828

829829

830+
#ifdef CONFIG_NET
830831
#define for_each_netdev(net, d) \
831832
list_for_each_entry(d, &(net)->dev_base_head, dev_list)
832833
#define for_each_netdev_safe(net, d, n) \
@@ -850,6 +851,7 @@ static inline struct net_device *first_net_device(struct net *net)
850851
return list_empty(&net->dev_base_head) ? NULL :
851852
net_device_entry(net->dev_base_head.next);
852853
}
854+
#endif
853855

854856
extern int netdev_boot_setup_check(struct net_device *dev);
855857
extern unsigned long netdev_boot_base(const char *prefix, int unit);

0 commit comments

Comments
 (0)