Skip to contentSkip to conversation

net: ip, diag: include net/inet_sock.h

PATCH Applied Arnd Bergmann 3 participants 3 messages Oct 25, 2016 – Oct 29, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ip, diag: include net/inet_sock.h

The newly added raw_diag.c fails to build in some configurations unless we include this header:

In file included from net/ipv4/raw_diag.c:6:0:
include/net/raw.h:71:21: error: field 'inet' has incomplete type net/ipv4/raw_diag.c: In function 'raw_diag_dump':
net/ipv4/raw_diag.c:166:29: error: implicit declaration of function 'inet_sk'

Fixes 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets")
---
 net/ipv4/raw_diag.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv4/raw_diag.c +1 -0
index ef3bea061b75..be930908bcf9 100644
@@ -3,6 +3,7 @@
 #include <linux/inet_diag.h>
 #include <linux/sock_diag.h>
 
+#include <net/inet_sock.h>
 #include <net/raw.h>
 #include <net/rawv6.h>
 
Signature · 1 line
2.9.0
#1 lore raw
Quoted 10 lines · Arnd Bergmann

The newly added raw_diag.c fails to build in some configurations unless we include this header:

In file included from net/ipv4/raw_diag.c:6:0:
include/net/raw.h:71:21: error: field 'inet' has incomplete type net/ipv4/raw_diag.c: In function 'raw_diag_dump':
net/ipv4/raw_diag.c:166:29: error: implicit declaration of function 'inet_sk'

Fixes 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets")

Thank you! And sorry for this, it didn't trigger on my testing.

maintainer Applied
#2 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Tue, 25 Oct 2016 17:53:22 +0200

Quoted 10 lines

The newly added raw_diag.c fails to build in some configurations unless we include this header:

In file included from net/ipv4/raw_diag.c:6:0:
include/net/raw.h:71:21: error: field 'inet' has incomplete type net/ipv4/raw_diag.c: In function 'raw_diag_dump':
net/ipv4/raw_diag.c:166:29: error: implicit declaration of function 'inet_sk'

Fixes 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets")

Applied, thanks Arnd.