fltk-1.1.7-scandir-fix.patch 902 B

1234567891011121314151617181920
  1. Use the correct scandir() call.
  2. See http://www.fltk.org/str.php?L2205. This patch is a simplified
  3. version of http://www.fltk.org/strfiles/2205/scandir_posix.patch.
  4. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  5. Index: fltk-1.1.7/src/filename_list.cxx
  6. ===================================================================
  7. --- fltk-1.1.7.orig/src/filename_list.cxx 2010-05-21 15:58:09.000000000 +0200
  8. +++ fltk-1.1.7/src/filename_list.cxx 2010-05-21 16:00:21.000000000 +0200
  9. @@ -54,7 +54,7 @@
  10. Fl_File_Sort_F *sort) {
  11. #ifndef HAVE_SCANDIR
  12. int n = scandir(d, list, 0, sort);
  13. -#elif defined(__hpux) || defined(__CYGWIN__)
  14. +#elif defined(__hpux) || defined(__CYGWIN__) || defined(__USE_POSIX)
  15. // HP-UX, Cygwin define the comparison function like this:
  16. int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
  17. #elif defined(__osf__)