← Commit list

1e18a01fa

Denys Vlasenko
Denys Vlasenko
2011-06-21
FAILED Duration: 239s

Subject

ls: fix HAVE_STRVERSCMP check; add check for older uclibc versions

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/ls.c+1 -1
@@ -886,7 +886,7 @@ 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 defined(HAVE_STRVERSCMP) && HAVE_STRVERSCMP == 1
if (sort_opts == SORT_VERSION) {
dif = strverscmp(d1->name, d2->name);
} else
include/platform.h+10 -0
@@ -359,6 +359,16 @@ typedef unsigned smalluint;
# undef HAVE_NET_ETHERNET_H
#endif
+#if defined(__UCLIBC_MAJOR__)
+# if __UCLIBC_MAJOR__ == 0 \
+ && ( __UCLIBC_MINOR__ < 9 \
+ || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 31) \
+ )
+# undef HAVE_STRVERSCMP
+# endif
+#endif
+
+
#if defined(__dietlibc__)
# undef HAVE_STRCHRNUL
#endif