[Devel] Re: [PATCH 0/3 net-2.6.26] Compilation fixes.

Denis V. Lunev den at openvz.org
Wed Apr 2 03:01:14 PDT 2008


On Wed, 2008-04-02 at 00:10 -0700, David Miller wrote:
> From: "Denis V. Lunev" <den at openvz.org>
> Date: Mon, 31 Mar 2008 19:46:01 +0400
> 
> > Hello, Dave!
> > 
> > Recently I have seen several issues post to the netdev@ blaming
> > inclusion of the net_namespace.h from seq_file. This set fixes this
> > problem after two small cleanups.
> 
> All applied, thanks Denis.
> 
> I'll push to net-2.6.26 after some build sanity checks.

Dave, could you pls conside this addition. This should fix problem
reported by the Kamalesh Babulal <kamalesh at linux.vnet.ibm.com> recently.
-------------- next part --------------
[NETNS]: Declare init_net even without CONFIG_NET defined.

This seems bogus but there is no other way for now. There are several
placec when networking headers are included even without CONFIG_NET and
the possibility of the similar reports in the nearest future is great.

Signed-off-by: Denis V. Lunev <den at openvz.org>
----
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 6c9a48a..0ab62ed 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -60,11 +60,12 @@ struct net {
 };
 
 
-#ifdef CONFIG_NET
 #include <linux/seq_file_net.h>
 
 /* Init's network namespace */
 extern struct net init_net;
+
+#ifdef CONFIG_NET
 #define INIT_NET_NS(net_ns) .net_ns = &init_net,
 
 extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns);
-------------- next part --------------
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers


More information about the Devel mailing list