diff options
author | Denys Vlasenko | 2011-06-21 16:38:29 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-06-21 16:38:29 +0200 |
commit | 561f9c8585e7cb0882472297f4fd2ed763dc085a (patch) | |
tree | d7cce0d468e453674f0714c87746f90af8223f35 /coreutils/ls.c | |
parent | 040b5a2e29743e21698d98c427fe033ffcc94eeb (diff) | |
download | busybox-561f9c8585e7cb0882472297f4fd2ed763dc085a.zip busybox-561f9c8585e7cb0882472297f4fd2ed763dc085a.tar.gz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index c42f5f3..6080f59 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -886,9 +886,11 @@ static int sortcmp(const void *a, const void *b) if (sort_opts == SORT_DIR) { dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode); } else +#ifdef HAVE_STRVERSCMP && HAVE_STRVERSCMP == 1 if (sort_opts == SORT_VERSION) { dif = strverscmp(d1->name, d2->name); } else +#endif if (sort_opts == SORT_EXT) { dif = strcmp(strchrnul(d1->name, '.'), strchrnul(d2->name, '.')); } |