mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
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
This commit is contained in:
parent
4d0be3986c
commit
2546c543fd
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue