Patchwork [-next] net: fix net/core/sock.c build error

login
register
mail settings
Submitter Randy.Dunlap
Date Sept. 10, 2012, 4:13 p.m.
Message ID <504E1193.4060809@xenotime.net>
Download mbox | patch
Permalink /patch/182923/
State Accepted
Delegated to: David Miller
Headers show

Comments

Randy.Dunlap - Sept. 10, 2012, 4:13 p.m.
From: Randy Dunlap <rdunlap@xenotime.net>

Fix net/core/sock.c build error when CONFIG_INET is not enabled:

net/built-in.o: In function `sock_edemux':
(.text+0xd396): undefined reference to `inet_twsk_put'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 net/core/sock.c |    2 ++
 1 file changed, 2 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Sept. 10, 2012, 8:45 p.m.
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Mon, 10 Sep 2012 09:13:07 -0700

> From: Randy Dunlap <rdunlap@xenotime.net>
> 
> Fix net/core/sock.c build error when CONFIG_INET is not enabled:
> 
> net/built-in.o: In function `sock_edemux':
> (.text+0xd396): undefined reference to `inet_twsk_put'
> 
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>

Applied to 'net', thanks Randy.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- linux-next-20120910.orig/net/core/sock.c
+++ linux-next-20120910/net/core/sock.c
@@ -1525,9 +1525,11 @@  void sock_edemux(struct sk_buff *skb)
 {
 	struct sock *sk = skb->sk;
 
+#ifdef CONFIG_INET
 	if (sk->sk_state == TCP_TIME_WAIT)
 		inet_twsk_put(inet_twsk(sk));
 	else
+#endif
 		sock_put(sk);
 }
 EXPORT_SYMBOL(sock_edemux);