]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bsd-user: style tweak: move extern to header file
authorWarner Losh <imp@bsdimp.com>
Fri, 23 Apr 2021 16:41:11 +0000 (10:41 -0600)
committerWarner Losh <imp@bsdimp.com>
Tue, 11 May 2021 17:07:21 +0000 (11:07 -0600)
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>
bsd-user/main.c
bsd-user/qemu.h

index cd1c26516bea48ca9b49fa2e3135ab2ab0c81143..71bfe17f38e07cff03ad0ccf58f93da325ef8672 100644 (file)
@@ -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;
 
 /*
index 7ccc8ad3977a9e524afa240a21c55bc5cdbba954..5a82722281d8c2723245fd1d73093c7587b96e8c 100644 (file)
@@ -27,6 +27,8 @@
 
 #include "exec/user/abitypes.h"
 
+extern char **environ;
+
 enum BSDType {
     target_freebsd,
     target_netbsd,