kumquat-buildroot/package/wvdial/0001-uClibc-scandir.patch
Peter Korsgaard 298cd8eaa2 package/*: rename patches according to the new policy
Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345)

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-02-03 14:52:56 +01:00

24 lines
924 B
Diff

Fix wvdial so that it works with scandir as defined in uClibc.
Signed-off-by: Simon Dawson <spdawson@gmail.com>
diff -Nurp a/wvmodemscan.cc b/wvmodemscan.cc
--- a/wvmodemscan.cc 2009-09-29 18:27:28.000000000 +0100
+++ b/wvmodemscan.cc 2012-07-28 14:03:56.359729660 +0100
@@ -495,13 +495,13 @@ static int fileselect(const struct diren
// (no internal ISDN support) || !strncmp(e->d_name, "ttyI", 4);
}
-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)
+#if defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10))
static int filesort(const dirent **e1, const dirent **e2)
#else
static int filesort(const void *_e1, const void *_e2)
#endif
{
-#if !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 10))
+#if !(defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)))
dirent const * const *e1 = (dirent const * const *)_e1;
dirent const * const *e2 = (dirent const * const *)_e2;
#endif