[patch] net, 9p: build fix with !CONFIG_SYSCTL

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Thursday, October 4, 2007 - 4:55 am

Subject: net, 9p: build fix with !CONFIG_SYSCTL
From: Ingo Molnar <mingo@elte.hu>

found via make randconfig build testing: 

 net/built-in.o: In function `init_p9':
 mod.c:(.init.text+0x3b39): undefined reference to `p9_sysctl_register'
 net/built-in.o: In function `exit_p9':
 mod.c:(.exit.text+0x36b): undefined reference to `p9_sysctl_unregister'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/net/9p/9p.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: linux/include/net/9p/9p.h
===================================================================
--- linux.orig/include/net/9p/9p.h
+++ linux/include/net/9p/9p.h
@@ -412,6 +412,18 @@ int p9_idpool_check(int id, struct p9_id
 
 int p9_error_init(void);
 int p9_errstr2errno(char *, int);
+
+#ifdef CONFIG_SYSCTL
 int __init p9_sysctl_register(void);
 void __exit p9_sysctl_unregister(void);
+#else
+static inline int p9_sysctl_register(void)
+{
+	return 0;
+}
+static inline void p9_sysctl_unregister(void)
+{
+}
+#endif
+
 #endif /* NET_9P_H */
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Linus Torvalds, (Mon Oct 1, 8:41 pm)
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Rafael J. Wysocki, (Tue Oct 2, 1:12 pm)
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Rafael J. Wysocki, (Tue Oct 2, 1:31 pm)
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Alistair John Strachan, (Tue Oct 2, 3:51 pm)
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Glauber de Oliveira ..., (Tue Oct 2, 4:00 pm)
[patch] net, 9p: build fix with !CONFIG_SYSCTL, Ingo Molnar, (Thu Oct 4, 4:55 am)
[BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 10:05 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Peter Zijlstra, (Thu Oct 4, 10:17 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Linus Torvalds, (Thu Oct 4, 10:27 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 1:44 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 1:47 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Linus Torvalds, (Thu Oct 4, 2:21 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Chuck Ebbert, (Thu Oct 4, 2:50 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 2:54 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 2:58 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Paul Mackerras, (Thu Oct 4, 3:27 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Linus Torvalds, (Thu Oct 4, 5:12 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Mathieu Chouquet-Str ..., (Thu Oct 4, 8:22 pm)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Peter Zijlstra, (Fri Oct 5, 12:43 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Hans-Peter Jansen, (Sat Oct 6, 1:29 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Hans-Peter Jansen, (Sat Oct 6, 4:29 am)
Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES, Bill Davidsen, (Sat Oct 6, 10:36 am)
Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.., Alistair John Strachan, (Sun Oct 7, 4:44 pm)