summaryrefslogtreecommitdiffstats
path: root/package/fltk/fltk-1.1.7-scandir-fix.patch
blob: ba2b56093384049221ba4c01abebec9f12cdf00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Use the correct scandir() call.

See http://www.fltk.org/str.php?L2205. This patch is a simplified
version of http://www.fltk.org/strfiles/2205/scandir_posix.patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: fltk-1.1.7/src/filename_list.cxx
===================================================================
--- fltk-1.1.7.orig/src/filename_list.cxx	2010-05-21 15:58:09.000000000 +0200
+++ fltk-1.1.7/src/filename_list.cxx	2010-05-21 16:00:21.000000000 +0200
@@ -54,7 +54,7 @@
                      Fl_File_Sort_F *sort) {
 #ifndef HAVE_SCANDIR
   int n = scandir(d, list, 0, sort);
-#elif defined(__hpux) || defined(__CYGWIN__)
+#elif defined(__hpux) || defined(__CYGWIN__) || defined(__USE_POSIX)
   // HP-UX, Cygwin define the comparison function like this:
   int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
 #elif defined(__osf__)
OpenPOWER on IntegriCloud