public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.4.4-ac3 +IPX -SYSCTL compile fix
@ 2001-05-02 14:49 Pavel Roskin
  2001-05-02 15:17 ` Pavel Roskin
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Roskin @ 2001-05-02 14:49 UTC (permalink / raw)
  To: linux-kernel

Hello!

File net/ipx/sysctl_net_ipx.c provides dummy functions for
ipx_register_sysctl and ipx_unregister_sysctl if CONFIG_SYSCTL is not
defined. The problem is, sysctl_net_ipx.c is not even compiled in this
case.

I'm moving the dummy functions to af_ipx.c where they are used. Not sure
about conformance with the coding standards, but I think that "static
inline" is preferred over defines. Feel free to correct me.

The patch is also here:
http://www.red-bean.com/~proski/linux/ipxsysctl.diff

The patch has been tested. IPX works fine without SYSCTL.

Regards,
Pavel Roskin

----------------------------------------------
--- linux.orig/net/ipx/af_ipx.c
+++ linux/net/ipx/af_ipx.c
@@ -116,8 +116,18 @@
 #include <linux/init.h>
 #include <linux/if_arp.h>

+#ifdef CONFIG_SYSCTL
 extern void ipx_register_sysctl(void);
 extern void ipx_unregister_sysctl(void);
+#else
+static inline void ipx_register_sysctl(void)
+{
+}
+
+static inline void ipx_unregister_sysctl(void)
+{
+}
+#endif

 /* Configuration Variables */
 static unsigned char ipxcfg_max_hops = 16;
--- linux.orig/net/ipx/sysctl_net_ipx.c
+++ linux/net/ipx/sysctl_net_ipx.c
@@ -44,11 +44,5 @@ void ipx_unregister_sysctl(void)
 }

 #else
-void ipx_register_sysctl(void)
-{
-}
-
-void ipx_unregister_sysctl(void)
-{
-}
+#error This file shouldn't be compiled without CONFIG_SYSCTL defined
 #endif


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

end of thread, other threads:[~2001-05-02 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-02 14:49 [PATCH] 2.4.4-ac3 +IPX -SYSCTL compile fix Pavel Roskin
2001-05-02 15:17 ` Pavel Roskin
2001-05-02 16:58   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox