aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-06-21 17:12:52 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-06-21 17:12:52 +0200
commit1e18a01fa2965ef967b99d519018e21c9b5f15af (patch)
treeb76c9ea65545bfeaa76e822eed76f9b476a8ef32
parent33092f1003982fc26339c0fda66283805cfbcfb1 (diff)
downloadbusybox-w32-1e18a01fa2965ef967b99d519018e21c9b5f15af.tar.gz
busybox-w32-1e18a01fa2965ef967b99d519018e21c9b5f15af.tar.bz2
busybox-w32-1e18a01fa2965ef967b99d519018e21c9b5f15af.zip
ls: fix HAVE_STRVERSCMP check; add check for older uclibc versions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/ls.c2
-rw-r--r--include/platform.h10
2 files changed, 11 insertions, 1 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 6080f59b6..f11eb4358 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -886,7 +886,7 @@ 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 defined(HAVE_STRVERSCMP) && HAVE_STRVERSCMP == 1
890 if (sort_opts == SORT_VERSION) { 890 if (sort_opts == SORT_VERSION) {
891 dif = strverscmp(d1->name, d2->name); 891 dif = strverscmp(d1->name, d2->name);
892 } else 892 } else
diff --git a/include/platform.h b/include/platform.h
index d6b748844..cbe85f469 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -359,6 +359,16 @@ typedef unsigned smalluint;
359# undef HAVE_NET_ETHERNET_H 359# undef HAVE_NET_ETHERNET_H
360#endif 360#endif
361 361
362#if defined(__UCLIBC_MAJOR__)
363# if __UCLIBC_MAJOR__ == 0 \
364 && ( __UCLIBC_MINOR__ < 9 \
365 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 31) \
366 )
367# undef HAVE_STRVERSCMP
368# endif
369#endif
370
371
362#if defined(__dietlibc__) 372#if defined(__dietlibc__)
363# undef HAVE_STRCHRNUL 373# undef HAVE_STRCHRNUL
364#endif 374#endif