From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric W. Biederman" Subject: [PATCH net-next 17/43] netfilter: use forward declaration instead of including linux/proc_fs.h Date: Wed, 17 Jun 2015 10:28:26 -0500 Message-ID: <1434554932-4552-17-git-send-email-ebiederm@xmission.com> References: <87r3pae5hn.fsf@x220.int.ebiederm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: , netfilter-devel@vger.kernel.org, Stephen Hemminger , Juanjo Ciarlante , Wensong Zhang , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Patrick McHardy , Jozsef Kadlecsik , Jamal Hadi Salim , Steffen Klassert , Herbert Xu To: David Miller Return-path: In-Reply-To: <87r3pae5hn.fsf@x220.int.ebiederm.org> Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org =46rom: Pablo Neira Ayuso We don't need to pull the full definitions in that file, a simple forwa= rd declaration is enough. Moreover, include linux/procfs.h from nf_synproxy_core, otherwise this = hits a compilation error due to missing declarations, ie. net/netfilter/nf_synproxy_core.c: In function =E2=80=98synproxy_proc_in= it=E2=80=99: net/netfilter/nf_synproxy_core.c:326:2: error: implicit declaration of = function =E2=80=98proc_create=E2=80=99 [-Werror=3Dimplicit-function-dec= laration] if (!proc_create("synproxy", S_IRUGO, net->proc_net_stat, ^ Signed-off-by: Pablo Neira Ayuso Signed-off-by: Eric W. Biederman --- include/net/netns/netfilter.h | 2 +- net/netfilter/nf_synproxy_core.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilte= r.h index 88740024ccf3..cf25b5e35f3c 100644 --- a/include/net/netns/netfilter.h +++ b/include/net/netns/netfilter.h @@ -1,9 +1,9 @@ #ifndef __NETNS_NETFILTER_H #define __NETNS_NETFILTER_H =20 -#include #include =20 +struct proc_dir_entry; struct nf_logger; =20 struct netns_nf { diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synpro= xy_core.c index 52e20c9a46a5..789feeae6c44 100644 --- a/net/netfilter/nf_synproxy_core.c +++ b/net/netfilter/nf_synproxy_core.c @@ -11,6 +11,7 @@ #include #include #include +#include =20 #include #include --=20 2.2.1