From: Jesse Gross Date: Fri, 21 Jun 2013 23:17:11 +0000 (-0700) Subject: ip_tunnel: Protect tunnel functions with CONFIG_INET guard. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5243b6ac9ed1310f2329b3d0a830a55589e518ea;p=openwrt%2Fstaging%2Fblogic.git ip_tunnel: Protect tunnel functions with CONFIG_INET guard. Tunnel constants can be used in generic code but in these cases the inline functions in ip_tunnels.h cause compilation problems if CONFIG_INET is not set. CC: Pravin Shelar Reported-by: Randy Dunlap Signed-off-by: Jesse Gross Acked-by: Randy Dunlap Signed-off-by: David S. Miller --- diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 10bbb4273f7d..b0d982471a5c 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -93,6 +93,8 @@ struct ip_tunnel_net { struct net_device *fb_tunnel_dev; }; +#ifdef CONFIG_INET + int ip_tunnel_init(struct net_device *dev); void ip_tunnel_uninit(struct net_device *dev); void ip_tunnel_dellink(struct net_device *dev, struct list_head *head); @@ -180,4 +182,7 @@ static inline void iptunnel_xmit_stats(int err, err_stats->tx_dropped++; } } + +#endif /* CONFIG_INET */ + #endif /* __NET_IP_TUNNELS_H */