[PATCH -next] sysctl: fix build when SYSCTL=y, SYSCTL_SYSCALL=n

From: Randy Dunlap
Date: Fri Jul 18 2008 - 20:27:36 EST


From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

The stub needs to be provided when CONFIG_SYSCTL=n, not when
CONFIG_SYSCTL_SYSCALL=n.

linux-next-20080718/kernel/sysctl.c:2970: error: redefinition of 'setup_sysctl_set'
linux-next-20080718/kernel/sysctl.c:1963: error: previous definition of 'setup_sysctl_set' was here

Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
---
kernel/sysctl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-next-20080718.orig/kernel/sysctl.c
+++ linux-next-20080718/kernel/sysctl.c
@@ -1982,6 +1982,12 @@ void unregister_sysctl_table(struct ctl_
{
}

+void setup_sysctl_set(struct ctl_table_set *p,
+ struct ctl_table_set *parent,
+ int (*is_seen)(struct ctl_table_set *))
+{
+}
+
#endif /* CONFIG_SYSCTL */

/*
@@ -2964,12 +2970,6 @@ int sysctl_ms_jiffies(struct ctl_table *
return -ENOSYS;
}

-void setup_sysctl_set(struct ctl_table_set *p,
- struct ctl_table_set *parent,
- int (*is_seen)(struct ctl_table_set *))
-{
-}
-
#endif /* CONFIG_SYSCTL_SYSCALL */

static int deprecated_sysctl_warning(struct __sysctl_args *args)


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
--
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/