Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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
# 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