aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2021-04-23 10:41:11 -0600
committerWarner Losh <imp@bsdimp.com>2021-05-11 11:07:21 -0600
commit4b599848a8eac9cb12151c81c8815af2c1e03691 (patch)
tree83ae11138ca3962ffabe9d90f7eea22b95e32640 /bsd-user
parentac31939941932de66e7848f1ee53d404e8ab0a2f (diff)
downloadqemu-4b599848a8eac9cb12151c81c8815af2c1e03691.zip
qemu-4b599848a8eac9cb12151c81c8815af2c1e03691.tar.gz
qemu-4b599848a8eac9cb12151c81c8815af2c1e03691.tar.bz2
bsd-user: style tweak: move extern to header file
extern char **environ has no standard home, so move the declaration from the .c file to a handy .h file. Since this is a standard, old-school UNIX interface dating from the 5th edition, it's not quite the same issue that the rule is supposed to protect against, though. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/main.c1
-rw-r--r--bsd-user/qemu.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index cd1c265..71bfe17 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -47,7 +47,6 @@ unsigned long reserved_va;
static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
const char *qemu_uname_release;
-extern char **environ;
enum BSDType bsd_type;
/*
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 7ccc8ad..5a82722 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -27,6 +27,8 @@
#include "exec/user/abitypes.h"
+extern char **environ;
+
enum BSDType {
target_freebsd,
target_netbsd,