diff mbox

[net] net: fix compile error in skb_orphan_partial()

Message ID 1494966473.6465.13.camel@edumazet-glaptop3.roam.corp.google.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet May 16, 2017, 8:27 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

If CONFIG_INET is not set, net/core/sock.c can not compile :

net/core/sock.c: In function ‘skb_orphan_partial’:
net/core/sock.c:1810:2: error: implicit declaration of function
‘skb_is_tcp_pure_ack’ [-Werror=implicit-function-declaration]
  if (skb_is_tcp_pure_ack(skb))
  ^

Fix this by always including <net/tcp.h>

Fixes: f6ba8d33cfbb ("netem: fix skb_orphan_partial()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/core/sock.c |    3 ---
 1 file changed, 3 deletions(-)

Comments

David Miller May 17, 2017, 7:11 p.m. UTC | #1
From: Eric Dumazet <eric.dumazet@gmail.com>

Date: Tue, 16 May 2017 13:27:53 -0700

> From: Eric Dumazet <edumazet@google.com>

> 

> If CONFIG_INET is not set, net/core/sock.c can not compile :

> 

> net/core/sock.c: In function ‘skb_orphan_partial’:

> net/core/sock.c:1810:2: error: implicit declaration of function

> ‘skb_is_tcp_pure_ack’ [-Werror=implicit-function-declaration]

>   if (skb_is_tcp_pure_ack(skb))

>   ^

> 

> Fix this by always including <net/tcp.h>

> 

> Fixes: f6ba8d33cfbb ("netem: fix skb_orphan_partial()")

> Signed-off-by: Eric Dumazet <edumazet@google.com>

> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>

> Reported-by: Randy Dunlap <rdunlap@infradead.org>

> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>


Applied and queued up for -stable, thanks Eric.
diff mbox

Patch

diff --git a/net/core/sock.c b/net/core/sock.c
index e43e71d7856b385111cd4c4b1bd835a78c670c60..727f924b7f91f495d9e7a4e7297c9c937d3258ed 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -139,10 +139,7 @@ 
 
 #include <trace/events/sock.h>
 
-#ifdef CONFIG_INET
 #include <net/tcp.h>
-#endif
-
 #include <net/busy_poll.h>
 
 static DEFINE_MUTEX(proto_list_mutex);