aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-06-21 16:38:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-06-21 16:38:29 +0200
commit561f9c8585e7cb0882472297f4fd2ed763dc085a (patch)
treed7cce0d468e453674f0714c87746f90af8223f35 /coreutils/ls.c
parent040b5a2e29743e21698d98c427fe033ffcc94eeb (diff)
downloadbusybox-w32-561f9c8585e7cb0882472297f4fd2ed763dc085a.tar.gz
busybox-w32-561f9c8585e7cb0882472297f4fd2ed763dc085a.tar.bz2
busybox-w32-561f9c8585e7cb0882472297f4fd2ed763dc085a.zip
Add HAVE_STRVERSCMP, guard the only usage of strverscmp with #ifdef
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index c42f5f3d2..6080f59b6 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -886,9 +886,11 @@ static int sortcmp(const void *a, const void *b)
886 if (sort_opts == SORT_DIR) { 886 if (sort_opts == SORT_DIR) {
887 dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode); 887 dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode);
888 } else 888 } else
889#ifdef HAVE_STRVERSCMP && HAVE_STRVERSCMP == 1
889 if (sort_opts == SORT_VERSION) { 890 if (sort_opts == SORT_VERSION) {
890 dif = strverscmp(d1->name, d2->name); 891 dif = strverscmp(d1->name, d2->name);
891 } else 892 } else
893#endif
892 if (sort_opts == SORT_EXT) { 894 if (sort_opts == SORT_EXT) {
893 dif = strcmp(strchrnul(d1->name, '.'), strchrnul(d2->name, '.')); 895 dif = strcmp(strchrnul(d1->name, '.'), strchrnul(d2->name, '.'));
894 } 896 }