linux-next: sysctl tree build failure

From: Stephen Rothwell
Date: Thu Nov 12 2009 - 02:48:16 EST


Hi Eric,

Today's linux-next build (powerpc allnoconfig) failed like this:

kernel/built-in.o: In function `get_sysctl':
sysctl_binary.c:(.text+0x100d4): undefined reference to `dev_get_by_index'

Caused by commit 26a7034b40ba80f82f64fa251a2cbf49f9971c6a ("sysctl:
Reduce sys_sysctl to a compatibility wrapper around /proc/sys").

CONFIG_NET is not set for this build.

I have used this patch for today:
(It does produce this warning, though:

kernel/sysctl_binary.c:1253: warning: unused variable 'net'

so needs more work.)

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 12 Nov 2009 18:43:35 +1100
Subject: [PATCH] sysctl: fix build dependency on CONFIG_NET

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
kernel/sysctl_binary.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index 471438b..4f58ea7 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1270,6 +1270,7 @@ repeat:
if (ctl_name == table->ctl_name)
procname = table->procname;

+#ifdef CONFIG_NET
/*
* For a wild card entry map from ifindex to network
* device name.
@@ -1279,6 +1280,7 @@ repeat:
if (dev)
procname = dev->name;
}
+#endif
if (procname) {
int len;

--
1.6.5.2

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/
--
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/