diff -ur src.o/sys/kern/kern_mib.c src/sys/kern/kern_mib.c --- src.o/sys/kern/kern_mib.c Sat May 12 21:38:18 2007 +++ src/sys/kern/kern_mib.c Mon May 14 00:24:25 2007 @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_mib.c,v 1.78 2007/05/12 19:38:18 wkoszek Exp $"); #include "opt_posix.h" +#include "opt_config.h" #include #include @@ -296,8 +297,12 @@ CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl, "I", "Current secure level"); +#ifdef INCLUDE_CONFIG_FILE /* Actual kernel configuration options. */ extern char kernconfstring[]; +#else +char kernconfstring[] = "\0"; +#endif static int sysctl_kern_config(SYSCTL_HANDLER_ARGS) diff -ur src.o/usr.sbin/config/kernconf.tmpl src/usr.sbin/config/kernconf.tmpl --- src.o/usr.sbin/config/kernconf.tmpl Sat May 12 21:38:18 2007 +++ src/usr.sbin/config/kernconf.tmpl Mon May 14 00:34:03 2007 @@ -7,11 +7,11 @@ #include "opt_config.h" #ifdef INCLUDE_CONFIG_FILE +/* + * For !INCLUDE_CONFIG_FILE case, you should look at kern_mib.c. This is + * where kernconfstring is defined then. + */ const char kernconfstring[] __attribute__ ((section("kern_conf"))) = "%%KERNCONFFILE%%"; - -#else - -const char kernconfstring[] = "\0"; #endif /* INCLUDE_CONFIG_FILE */