diff options
author | Warner Losh <imp@FreeBSD.org> | 2024-02-18 04:30:48 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-02-18 04:39:42 +0000 |
commit | 2546c543fd7955276388aae6f0869d2c9285ba59 (patch) | |
tree | 354ece7ad1b1881828dc1b26a0ed3626788cbed6 | |
parent | 4d0be3986c6bd34ca89b4befbf27adf9a4b2dbcb (diff) | |
download | src-2546c543fd7955276388aae6f0869d2c9285ba59.tar.gz src-2546c543fd7955276388aae6f0869d2c9285ba59.zip |
reboot: Move extern for environ
envorin isn't defined in any header, and gcc is cranky with this inside
a function, so move it to global scope. Both clang and gcc are now happy
with this.
Sponsored by: Netflix
-rw-r--r-- | sbin/reboot/reboot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 550530ad079e..d215255487a7 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -51,6 +51,8 @@ #include <unistd.h> #include <utmpx.h> +extern char **environ; + #define PATH_NEXTBOOT "/boot/nextboot.conf" static void usage(void) __dead2; @@ -84,7 +86,6 @@ zfsbootcfg(const char *pool, bool force) }; int rv, status; pid_t p; - extern char **environ; rv = posix_spawnp(&p, av[0], NULL, NULL, __DECONST(char **, av), environ); |