zfs_main.c: fix unused variable error with GCC

zfs_setproctitle_init() is stubbed out on FreeBSD.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Rob Wing <rob.fx907@gmail.com>
Closes #14441
This commit is contained in:
rob-wing 2023-02-02 14:16:40 -09:00 committed by Tony Hutter
parent 777c98ee52
commit 0e30635f9c
2 changed files with 1 additions and 1 deletions

View File

@ -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");

View File

@ -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