!CONFIG_NET_NS build error, net/core/net_namespace.c

From: Mike Galbraith
Date: Tue Feb 24 2009 - 08:00:47 EST



CC net/core/net_namespace.o
net/core/net_namespace.c: In function ânet_ns_initâ:
net/core/net_namespace.c:223: error: implicit declaration of function ânet_alloc_genericâ
net/core/net_namespace.c:223: warning: assignment makes pointer from integer without a cast
make[2]: *** [net/core/net_namespace.o] Error 1
make[1]: *** [net/core] Error 2
make: *** [net] Error 2


Impact: fix !CONFIG_NET_NS net/core/net_namespace.c build error

Signed-off-by: Mike Galbraith <efault@xxxxxx>

net/core/net_namespace.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index b0767ab..2adb1a7 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -63,10 +63,6 @@ out_undo:
goto out;
}

-#ifdef CONFIG_NET_NS
-static struct kmem_cache *net_cachep;
-static struct workqueue_struct *netns_wq;
-
static struct net_generic *net_alloc_generic(void)
{
struct net_generic *ng;
@@ -80,6 +76,10 @@ static struct net_generic *net_alloc_generic(void)
return ng;
}

+#ifdef CONFIG_NET_NS
+static struct kmem_cache *net_cachep;
+static struct workqueue_struct *netns_wq;
+
static struct net *net_alloc(void)
{
struct net *net = NULL;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/