aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/net_namespace.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 3ee4a3da716..ac9195e6a06 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -284,11 +284,20 @@ struct ctl_table_header;
#ifdef CONFIG_SYSCTL
extern int net_sysctl_init(void);
-#else
-static inline int net_sysctl_init(void) { return 0; }
-#endif
extern struct ctl_table_header *register_net_sysctl(struct net *net,
const char *path, struct ctl_table *table);
extern void unregister_net_sysctl_table(struct ctl_table_header *header);
+#else
+static inline int net_sysctl_init(void) { return 0; }
+static inline struct ctl_table_header *register_net_sysctl(struct net *net,
+ const char *path, struct ctl_table *table)
+{
+ return NULL;
+}
+static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
+{
+}
+#endif
+
#endif /* __NET_NET_NAMESPACE_H */