Skip to contentSkip to conversation

sysctl: fix build when SYSCTL=y, SYSCTL_SYSCALL=n

PATCH New Randy Dunlap 1 participant 1 message Jul 19, 2008 Proc sysctl

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysctl: fix build when SYSCTL=y, SYSCTL_SYSCALL=n

From: Randy Dunlap <[email protected]>

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

---
 kernel/sysctl.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
kernel/sysctl.c +6 -6
@@ -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/