net: fix net/core/sock.c build error
authorRandy Dunlap <rdunlap@xenotime.net>
Mon, 10 Sep 2012 16:13:07 +0000 (09:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Sep 2012 20:44:45 +0000 (16:44 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index 7f64467535d1ba657d042ec2dd7a5ef0322a7e97..30579207612175f0a65b19310368079c54ce4bc9 100644 (file)
@@ -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);