diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2007-09-13 07:16:29 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 23:49:21 (GMT) |
commit | 4fabcd7118162e36eea5c53e8895ecc13762bef3 (patch) | |
tree | 29a1b009e9bbd52bcce413f9b06c892b09783ccd /include/net/net_namespace.h | |
parent | e08b09983fe9cf379faf1aefdf9164268d4610e7 (diff) | |
download | linux-fsl-qoriq-4fabcd7118162e36eea5c53e8895ecc13762bef3.tar.xz |
[NETNS]: Fix allnoconfig compilation error.
When CONFIG_NET=no, init_net is unresolved because net_namespace.c
is not compiled and the include pull init_net definition.
This problem was very similar with the ipc namespace where the kernel
can be compiled with SYSV ipc out.
This patch fix that defining a macro which simply remove init_net
initialization from nsproxy namespace aggregator.
Compiled and booted on qemu-i386 with CONFIG_NET=no and CONFIG_NET=yes.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index fac42db..3081b6e 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -28,7 +28,14 @@ struct net { struct hlist_head *dev_index_head; }; +#ifdef CONFIG_NET +/* Init's network namespace */ extern struct net init_net; +#define INIT_NET_NS(net_ns) .net_ns = &init_net, +#else +#define INIT_NET_NS(net_ns) +#endif + extern struct list_head net_namespace_list; extern void __put_net(struct net *net); |