diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index cec025ce6..1ffe805aa 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -8672,7 +8672,6 @@ main(int argc, char **argv) int i = 0; const char *cmdname; char **newargv; - extern char **environ; (void) setlocale(LC_ALL, ""); (void) setlocale(LC_NUMERIC, "C"); diff --git a/include/libzutil.h b/include/libzutil.h index 4d4bddaad..948ac08cd 100644 --- a/include/libzutil.h +++ b/include/libzutil.h @@ -183,6 +183,7 @@ _LIBZUTIL_H int printf_color(const char *color, const char *format, ...); _LIBZUTIL_H const char *zfs_basename(const char *path); _LIBZUTIL_H ssize_t zfs_dirnamelen(const char *path); #ifdef __linux__ +extern char **environ; _LIBZUTIL_H void zfs_setproctitle_init(int argc, char *argv[], char *envp[]); _LIBZUTIL_H void zfs_setproctitle(const char *fmt, ...); #else