netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n
@ 2008-02-05 18:43 Johann Felix Soden
  2008-02-05 19:57 ` Denis V. Lunev
  2008-02-06  0:34 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Johann Felix Soden @ 2008-02-05 18:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Denis V. Lunev

From: Johann Felix Soden <johfel@users.sourceforge.net>

Handle CONFIG_PROC_FS=n in net/ipv4/fib_frontend.c because:

net/ipv4/fib_frontend.c: In function 'fib_net_init':
net/ipv4/fib_frontend.c:1032: error: implicit declaration of function 'fib_proc_init'
net/ipv4/fib_frontend.c: In function 'fib_net_exit':
net/ipv4/fib_frontend.c:1047: error: implicit declaration of function 'fib_proc_exit'

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
---
 net/ipv4/fib_frontend.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 86ff271..581d588 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1029,9 +1029,12 @@ static int __net_init fib_net_init(struct net *net)
 	error = nl_fib_lookup_init(net);
 	if (error < 0)
 		goto out_nlfl;
+#ifdef CONFIG_PROC_FS
 	error = fib_proc_init(net);
 	if (error < 0)
 		goto out_proc;
+#endif
+
 out:
 	return error;
 
@@ -1044,7 +1047,9 @@ out_nlfl:
 
 static void __net_exit fib_net_exit(struct net *net)
 {
+#ifdef CONFIG_PROC_FS
 	fib_proc_exit(net);
+#endif
 	nl_fib_lookup_exit(net);
 	ip_fib_net_exit(net);
 }
-- 
1.5.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n
  2008-02-05 18:43 [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n Johann Felix Soden
@ 2008-02-05 19:57 ` Denis V. Lunev
  2008-02-06  0:34 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Denis V. Lunev @ 2008-02-05 19:57 UTC (permalink / raw)
  To: Johann Felix Soden; +Cc: David S. Miller, netdev

Johann Felix Soden wrote:
> From: Johann Felix Soden <johfel@users.sourceforge.net>
> 
> Handle CONFIG_PROC_FS=n in net/ipv4/fib_frontend.c because:
> 
> net/ipv4/fib_frontend.c: In function 'fib_net_init':
> net/ipv4/fib_frontend.c:1032: error: implicit declaration of function 'fib_proc_init'
> net/ipv4/fib_frontend.c: In function 'fib_net_exit':
> net/ipv4/fib_frontend.c:1047: error: implicit declaration of function 'fib_proc_exit'
> 
> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>

Fix from Li Zefan is already commited.
(cc8274f50f2ad9a97a837451f63a0a3e65f7f490)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n
  2008-02-05 18:43 [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n Johann Felix Soden
  2008-02-05 19:57 ` Denis V. Lunev
@ 2008-02-06  0:34 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-02-06  0:34 UTC (permalink / raw)
  To: johfel; +Cc: netdev, den

From: Johann Felix Soden <johfel@gmx.de>
Date: Tue, 05 Feb 2008 19:43:54 +0100

> From: Johann Felix Soden <johfel@users.sourceforge.net>
> 
> Handle CONFIG_PROC_FS=n in net/ipv4/fib_frontend.c because:
> 
> net/ipv4/fib_frontend.c: In function 'fib_net_init':
> net/ipv4/fib_frontend.c:1032: error: implicit declaration of function 'fib_proc_init'
> net/ipv4/fib_frontend.c: In function 'fib_net_exit':
> net/ipv4/fib_frontend.c:1047: error: implicit declaration of function 'fib_proc_exit'
> 
> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>

I'm pretty sure I merged in a change this morning which fixes
this.

BTW, in general we do not put ifdefs into *.c code to fix stuff
like this, instead we add empty implementations into a header
file which is a better place for ifdef tests.

And that's how the patch which was merged handles this problem.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-06  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05 18:43 [PATCH] [IPV4]: Fix compiler error with CONFIG_PROC_FS=n Johann Felix Soden
2008-02-05 19:57 ` Denis V. Lunev
2008-02-06  0:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).