lkml.org 
[lkml]   [2007]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL
On Tue, 18 Sep 2007 10:05:37 +0200 Andreas Herrmann <aherrman@arcor.de> wrote:

> Fix compile error if !CONFIG_SYSCTL:
>
> ...
> LD .tmp_vmlinux1
> net/built-in.o: In function `init_p9':
> net/9p/mod.c:59: undefined reference to `p9_sysctl_register'
> net/built-in.o: In function `exit_p9':
> net/9p/mod.c:75: undefined reference to `p9_sysctl_unregister'
> make: *** [.tmp_vmlinux1] Error 1
> ...

A better fix would be

--- a/include/net/9p/9p.h~9p-fix-compile-error-if-config_sysctl
+++ a/include/net/9p/9p.h
@@ -412,6 +412,17 @@ 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 /* NET_9P_H */
diff -puN net/9p/mod.c~9p-fix-compile-error-if-config_sysctl net/9p/mod.c
_
I struggled for five minutes trying to work out how to make CONFIG_SYSCTL
go away and gave up in disgust.

God I hate select.

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

\
 
 \ /
  Last update: 2007-09-20 08:35    [W:0.462 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site