Author: kevans
Date: Thu May 21 15:15:50 2020
New Revision: 361332
URL: https://svnweb.freebsd.org/changeset/base/361332

Log:
  ls: fix WITHOUT_LS_COLORS build
  
  *sigh* references to colorflags should be gated by COLORLS.
  
  Pointy hat to:        kevans
  Reported by:  jenkins (rescue build)
  X-MFC-With:   r361318

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==============================================================================
--- head/bin/ls/ls.c    Thu May 21 14:39:00 2020        (r361331)
+++ head/bin/ls/ls.c    Thu May 21 15:15:50 2020        (r361332)
@@ -270,8 +270,10 @@ main(int argc, char *argv[])
         * For historical compatibility, we'll use our autodetection if CLICOLOR
         * is set.
         */
+#ifdef COLORLS
        if (getenv("CLICOLOR"))
                colorflag = COLORFLAG_AUTO;
+#endif
        while ((ch = getopt_long(argc, argv,
            "+1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,", long_opts,
            NULL)) != -1) {
@@ -355,7 +357,9 @@ main(int argc, char *argv[])
                         * stdout isn't a tty.
                         */
                        setenv("CLICOLOR", "", 1);
+#ifdef COLORLS
                        colorflag = COLORFLAG_AUTO;
+#endif
                        break;
                case 'H':
                        fts_options |= FTS_COMFOLLOW;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to