diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2009-08-04 23:18:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-04 23:18:33 -0400 |
commit | f816700aa9ef1b1e2f984f638cb211e79dcab495 (patch) | |
tree | 4c06f91ee8b123a3ab2d396afa96d468505885f9 /net/ipv4/xfrm4_policy.c | |
parent | e4c4e448cf557921ffbbbd6d6ddac81fdceacb4f (diff) |
xfrm4: fix build when SYSCTLs are disabled
Fix build errors when SYSCTLs are not enabled:
(.init.text+0x5154): undefined reference to `net_ipv4_ctl_path'
(.init.text+0x5176): undefined reference to `register_net_sysctl_table'
xfrm4_policy.c:(.exit.text+0x573): undefined reference to `unregister_net_sysctl_table
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 1ba44742ebbf..74fb2eb833ec 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -264,6 +264,7 @@ static struct xfrm_policy_afinfo xfrm4_policy_afinfo = { | |||
264 | .fill_dst = xfrm4_fill_dst, | 264 | .fill_dst = xfrm4_fill_dst, |
265 | }; | 265 | }; |
266 | 266 | ||
267 | #ifdef CONFIG_SYSCTL | ||
267 | static struct ctl_table xfrm4_policy_table[] = { | 268 | static struct ctl_table xfrm4_policy_table[] = { |
268 | { | 269 | { |
269 | .ctl_name = CTL_UNNUMBERED, | 270 | .ctl_name = CTL_UNNUMBERED, |
@@ -277,6 +278,7 @@ static struct ctl_table xfrm4_policy_table[] = { | |||
277 | }; | 278 | }; |
278 | 279 | ||
279 | static struct ctl_table_header *sysctl_hdr; | 280 | static struct ctl_table_header *sysctl_hdr; |
281 | #endif | ||
280 | 282 | ||
281 | static void __init xfrm4_policy_init(void) | 283 | static void __init xfrm4_policy_init(void) |
282 | { | 284 | { |
@@ -285,8 +287,10 @@ static void __init xfrm4_policy_init(void) | |||
285 | 287 | ||
286 | static void __exit xfrm4_policy_fini(void) | 288 | static void __exit xfrm4_policy_fini(void) |
287 | { | 289 | { |
290 | #ifdef CONFIG_SYSCTL | ||
288 | if (sysctl_hdr) | 291 | if (sysctl_hdr) |
289 | unregister_net_sysctl_table(sysctl_hdr); | 292 | unregister_net_sysctl_table(sysctl_hdr); |
293 | #endif | ||
290 | xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo); | 294 | xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo); |
291 | } | 295 | } |
292 | 296 | ||
@@ -305,7 +309,9 @@ void __init xfrm4_init(int rt_max_size) | |||
305 | * and start cleaning when were 1/2 full | 309 | * and start cleaning when were 1/2 full |
306 | */ | 310 | */ |
307 | xfrm4_dst_ops.gc_thresh = rt_max_size/2; | 311 | xfrm4_dst_ops.gc_thresh = rt_max_size/2; |
312 | #ifdef CONFIG_SYSCTL | ||
308 | sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path, | 313 | sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path, |
309 | xfrm4_policy_table); | 314 | xfrm4_policy_table); |
315 | #endif | ||
310 | } | 316 | } |
311 | 317 | ||