summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-10-07 06:16:37 +0000
committerWarner Losh <imp@FreeBSD.org>2020-10-07 06:16:37 +0000
commitbc683a89a3d7f17fcf0dd214f4d355877b9309a2 (patch)
tree683f5a704e0550550e3c52eaa6e87239e2bbea67
parent863f967f9560f5a6a3488d22ceaca41000cd7a40 (diff)
Notes
-rw-r--r--sys/dev/rt/if_rt.c2
-rw-r--r--sys/geom/eli/g_eli.c1
-rw-r--r--sys/kern/kern_environment.c1
-rw-r--r--sys/kern/subr_hints.c1
-rw-r--r--sys/sys/kenv.h14
-rw-r--r--sys/sys/systm.h14
6 files changed, 19 insertions, 14 deletions
diff --git a/sys/dev/rt/if_rt.c b/sys/dev/rt/if_rt.c
index cad848e5f617..91fa165bab69 100644
--- a/sys/dev/rt/if_rt.c
+++ b/sys/dev/rt/if_rt.c
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
#include "if_rtvar.h"
#include "if_rtreg.h"
+#include <sys/kenv.h>
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index 0a66d7224aa1..24b61d9f6d8e 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cons.h>
+#include <sys/kenv.h>
#include <sys/kernel.h>
#include <sys/linker.h>
#include <sys/module.h>
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 3c4efdf1aa2a..54992e6594ed 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/priv.h>
+#include <sys/kenv.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/sysent.h>
diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c
index 63ee87d27076..3614659ebcf2 100644
--- a/sys/kern/subr_hints.c
+++ b/sys/kern/subr_hints.c
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/lock.h>
+#include <sys/kenv.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
diff --git a/sys/sys/kenv.h b/sys/sys/kenv.h
index fd1ae31f6a95..4c851631f343 100644
--- a/sys/sys/kenv.h
+++ b/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_ */
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 761eec7a7565..1987b6568188 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -204,21 +204,7 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2);
})
#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 */