Skip to contentSkip to conversation

get rid of warnings if /proc not defined.

PATCH New Stephen Hemminger 1 participant 1 message Jul 25, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get rid of warnings if /proc not defined.

Trivial -- Get rid of warnings in netfilter if /proc is not configured on. Patch against 2.6.0-test1

net/ipv4/netfilter/ipt_recent.c +4 -0
diff -Nru a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
@@ -91,8 +91,10 @@
  */
 static spinlock_t recent_lock = SPIN_LOCK_UNLOCKED;
 
+#ifdef CONFIG_PROC_FS
 /* Our /proc/net/ipt_recent entry */
 static struct proc_dir_entry *proc_net_ipt_recent = NULL;
+#endif
 
 /* Function declaration for later. */
 static int
@@ -959,8 +961,10 @@
 	int count;
 
 	printk(version);
+#ifdef CONFIG_PROC_FS
 	proc_net_ipt_recent = proc_mkdir("ipt_recent",proc_net);
 	if(!proc_net_ipt_recent) return -ENOMEM;
+#endif
 
 	if(ip_list_hash_size && ip_list_hash_size <= ip_list_tot) {
 	  printk(KERN_WARNING RECENT_NAME ": ip_list_hash_size too small, resetting to default.\n");