ls: fix SEGV when --color is used and ENABLE_LS_COLOR=n
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 26 May 2019 11:53:41 +0000 (13:53 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 26 May 2019 11:53:41 +0000 (13:53 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/ls.c

index b2adb0c06ca611a5025d2ef174c7aa9e0508c1fb..e5375a61a7a73053396e457b5696031b11c69c0f 100644 (file)
@@ -1086,7 +1086,7 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
        static const char ls_longopts[] ALIGN1 =
                "full-time\0" No_argument "\xff"
                "group-directories-first\0" No_argument "\xfe"
-               "color\0" Optional_argument "\xfd"
+               IF_FEATURE_LS_COLOR("color\0" Optional_argument "\xfd")
        ;
 #endif