From 0e30635f9c0b45cf4686545fb104ab6c25dbd06d Mon Sep 17 00:00:00 2001 From: rob-wing <98866084+rob-wing@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:16:40 -0900 Subject: [PATCH] zfs_main.c: fix unused variable error with GCC zfs_setproctitle_init() is stubbed out on FreeBSD. Reviewed-by: Ryan Moeller Reviewed-by: Ameer Hamza Reviewed-by: Brian Behlendorf Reviewed-by: Richard Yao Signed-off-by: Rob Wing Closes #14441 --- cmd/zfs/zfs_main.c | 1 - include/libzutil.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index dabf0eb80b..7e77c865d4 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -8668,7 +8668,6 @@ main(int argc, char **argv) int i = 0; 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 8e081fff60..328487d78f 100644 --- a/include/libzutil.h +++ b/include/libzutil.h @@ -168,6 +168,7 @@ void color_end(void); int printf_color(const char *color, char *format, ...); #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