Index: sys/dev/rt/if_rt.c =================================================================== --- sys/dev/rt/if_rt.c +++ sys/dev/rt/if_rt.c @@ -38,6 +38,8 @@ #include "if_rtvar.h" #include "if_rtreg.h" +#include + #include #include #include Index: sys/geom/eli/g_eli.c =================================================================== --- sys/geom/eli/g_eli.c +++ sys/geom/eli/g_eli.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include Index: sys/kern/kern_environment.c =================================================================== --- sys/kern/kern_environment.c +++ sys/kern/kern_environment.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include Index: sys/kern/subr_hints.c =================================================================== --- sys/kern/subr_hints.c +++ sys/kern/subr_hints.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include Index: sys/sys/kenv.h =================================================================== --- sys/sys/kenv.h +++ sys/sys/kenv.h @@ -42,4 +42,18 @@ #define KENV_MNAMELEN 128 /* Maximum name length (for the syscall) */ #define KENV_MVALLEN 128 /* Maximum value length (for the syscall) */ +#ifdef _KERNEL +/* + * Most of these variables should be const. + */ +extern bool dynamic_kenv; +extern struct mtx kenv_lock; +extern char *kern_envp; +extern char *md_envp; +extern char static_env[]; +extern char static_hints[]; /* by config for now */ + +extern char **kenvp; +#endif /* _KERNEL */ + #endif /* !_SYS_KENV_H_ */ Index: sys/sys/systm.h =================================================================== --- sys/sys/systm.h +++ sys/sys/systm.h @@ -204,21 +204,7 @@ }) #define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread) -/* - * XXX the hints declarations are even more misplaced than most declarations - * in this file, since they are needed in one file (per arch) and only used - * in two files. - * XXX most of these variables should be const. - */ extern int osreldate; -extern bool dynamic_kenv; -extern struct mtx kenv_lock; -extern char *kern_envp; -extern char *md_envp; -extern char static_env[]; -extern char static_hints[]; /* by config for now */ - -extern char **kenvp; extern const void *zero_region; /* address space maps to a zeroed page */