summaryrefslogtreecommitdiff
path: root/include/net/ip6_tunnel.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-01-01 13:18:48 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-04 21:50:51 -0500
commit0efeff2905d0ea14f2ee83e6cefbda35ee8cf6fc (patch)
treeefd6236520e5ecffb0f9fa6ff723a3dc1f91f13f /include/net/ip6_tunnel.h
parent15ab90f400781a801017ea2bd8597e6eb3f39f79 (diff)
net: make ip6tunnel_xmit definition conditional
Moving the caller of iptunnel_xmit_stats causes a build error in randconfig builds that disable CONFIG_INET: In file included from ../net/xfrm/xfrm_input.c:17:0: ../include/net/ip6_tunnel.h: In function 'ip6tunnel_xmit': ../include/net/ip6_tunnel.h:93:2: error: implicit declaration of function 'iptunnel_xmit_stats' [-Werror=implicit-function-declaration] iptunnel_xmit_stats(dev, pkt_len); The reason is that the iptunnel_xmit_stats definition is hidden inside #ifdef CONFIG_INET but the caller is not. We can change one or the other to fix it, and this patch adds a second #ifdef around ip6tunnel_xmit() to avoid seeing the invalid call. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 039f50629b7f ("ip_tunnel: Move stats update to iptunnel_xmit()") Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_tunnel.h')
-rw-r--r--include/net/ip6_tunnel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index ae07e94778d8..0d0ce0b2d870 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -81,6 +81,7 @@ __u32 ip6_tnl_get_cap(struct ip6_tnl *t, const struct in6_addr *laddr,
struct net *ip6_tnl_get_link_net(const struct net_device *dev);
int ip6_tnl_get_iflink(const struct net_device *dev);
+#ifdef CONFIG_INET
static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
struct net_device *dev)
{
@@ -93,3 +94,4 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
iptunnel_xmit_stats(dev, pkt_len);
}
#endif
+#endif