Skip to contentSkip to conversation

sysctl_net.c:36: error: 'core_table' undeclared here

PATCH New Russell King 1 participant 1 message Oct 1, 2005

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

PATCH 1/1 sysctl_net.c:36: error: 'core_table' undeclared here

During the build for ARM machine type "fortunet", this error occurred:

CC net/sysctl_net.o
net/sysctl_net.c:36: error: 'core_table' undeclared here (not in a function)

The ARM configuration which produced this error can be found in:
arch/arm/configs/fortunet_defconfig

where the relevant options are:
CONFIG_SYSCTL=y
CONFIG_NET=y
# CONFIG_INET is not set

core_table appears to be declared in net/sock.h. if CONFIG_INET were defined, net/sock.h would have been included via:
sysctl_net.c -> net/ip.h -> linux/ip.h -> net/sock.h

so include it directly.

(This patch is completely untested atm; we're waiting for the machine to complete an existing build run. However, I think this is fairly obviously correct.)

net/sysctl_net.c +2 -0
@@ -16,6 +16,8 @@
 #include <linux/mm.h>
 #include <linux/sysctl.h>
 
+#include <net/sock.h>
+
 #ifdef CONFIG_INET
 #include <net/ip.h>
 #endif
Signature · 1 line
Russell King