diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 338b3d1d2a2..55990db711d 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -165,6 +165,7 @@ char *enter_bold; /* ANSI sequence to set color to bold mode */ static int rval; +#ifdef COLORLS static bool do_color_from_env(void) { @@ -187,6 +188,7 @@ do_color_from_env(void) return (doit && (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))); } +#endif static bool do_color(void) @@ -197,8 +199,10 @@ do_color(void) return (false); else if (colorflag == COLORFLAG_ALWAYS) return (true); -#endif return (do_color_from_env()); +#else + return (false); +#endif } #ifdef COLORLS -- 2.31.1