# HG changeset patch # User Christophe Lincoln # Date 1253824320 -7200 # Node ID c9c3cd46aa1a9e2b088d043f10bdbfc634912662 # Parent da1f31fbbf36478f943401dc3e0780f087597dec Fix: fltk build with new toolchain diff -r da1f31fbbf36 -r c9c3cd46aa1a fltk/receipt --- a/fltk/receipt Thu Sep 24 21:40:03 2009 +0200 +++ b/fltk/receipt Thu Sep 24 22:32:00 2009 +0200 @@ -16,6 +16,8 @@ compile_rules() { cd $src + patch -p 0 < ../stuff/filename_list-dirent.patch || exit 1 + patch -p 0 < ../stuff/fl_set_fonts_xft.patch || exit 1 ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ diff -r da1f31fbbf36 -r c9c3cd46aa1a fltk/stuff/filename_list-dirent.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fltk/stuff/filename_list-dirent.patch Thu Sep 24 22:32:00 2009 +0200 @@ -0,0 +1,11 @@ +--- src/filename_list.cxx Thu Sep 24 21:32:52 2009 ++++ src/filename_list.cxx Thu Sep 24 21:35:20 2009 +@@ -67,7 +67,7 @@ + // The vast majority of UNIX systems want the sort function to have this + // prototype, most likely so that it can be passed to qsort without any + // changes: +- int n = scandir(d, list, 0, (int(*)(const void*,const void*))sort); ++ int n = scandir(d, list, 0, (int(*)(const dirent **,const dirent **))sort); + #else + // This version is when we define our own scandir (WIN32 and perhaps + // some Unix systems) and apparently on IRIX: diff -r da1f31fbbf36 -r c9c3cd46aa1a fltk/stuff/fl_set_fonts_xft.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fltk/stuff/fl_set_fonts_xft.patch Thu Sep 24 22:32:00 2009 +0200 @@ -0,0 +1,19 @@ +--- src/fl_set_fonts_xft.cxx 2009-03-04 10:58:49.000000000 +0000 ++++ src/fl_set_fonts_xft.cxx 2009-03-04 11:01:25.000000000 +0000 +@@ -253,13 +253,13 @@ + // So the bit we want is up to the first comma - BUT some strings have + // more than one name, separated by, guess what?, a comma... + stop = start = first = 0; +- stop = strchr((const char *)font, ','); +- start = strchr((const char *)font, ':'); ++ stop = strchr((char *)font, ','); ++ start = strchr((char *)font, ':'); + if ((stop) && (start) && (stop < start)) + { + first = stop + 1; // discard first version of name + // find first comma *after* the end of the name +- stop = strchr((const char *)start, ','); ++ stop = strchr((char *)start, ','); + } + else + {