You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
693 B

diff -uNr coreutils-8.32/src/ls.c coreutils-8.32.mod/src/ls.c
--- coreutils-8.32/src/ls.c 2020-03-01 14:30:46.000000000 +0200
+++ coreutils-8.32.mod/src/ls.c 2020-03-08 19:48:36.132565243 +0200
@@ -1958,6 +1958,9 @@
}
}
+ /* Termux patch: Default to colors if terminal. The --color option may override this. */
+ print_with_color = isatty(STDOUT_FILENO);
+
while (true)
{
int oi = -1;
@@ -3018,7 +3021,7 @@
if (errno != EOVERFLOW)
break;
}
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
else if (! found_any_entries)
{
/* If readdir finds no directory entries at all, not even "." or