Skip to content

Commit

Permalink
zfs_main.c: fix unused variable error with GCC
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rob-wing authored and tonyhutter committed Mar 29, 2023
1 parent fa6a412 commit 7a443cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8638,7 +8638,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");
Expand Down
1 change: 1 addition & 0 deletions include/libzutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,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
Expand Down

0 comments on commit 7a443cf

Please sign in to comment.