summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch')
-rw-r--r--games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch
new file mode 100644
index 000000000000..e3c184724c6d
--- /dev/null
+++ b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch
@@ -0,0 +1,101 @@
+diff --git a/toycars_track_editor/src/TrackView.cxx b/toycars_track_editor/src/TrackView.cxx
+index d52daba..e1a66df 100644
+--- a/toycars_track_editor/src/TrackView.cxx
++++ b/toycars_track_editor/src/TrackView.cxx
+@@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *filename, SearchDirectories *dirs, char *
+ //{jpg,png,bmp,pnm,pbm,pgm,ppm}
+ Fl_Image* loadImage(const char *filename)
+ {
+- char *suffix = strrchr(filename, '.');
++ const char *suffix = strrchr(filename, '.');
+ if (suffix == NULL)
+ return NULL;
+ if (strcmp(suffix,".jpg") == 0)
+@@ -969,13 +969,13 @@ void TrackView::installMap(const char *name)
+ uninstallMap(name);
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(trackname, temp+1, 255);
+ }
+@@ -1044,13 +1044,13 @@ void TrackView::uninstallMap(const char *name)
+ char *temp;
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(trackname, temp+1, 255);
+ }
+diff --git a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
+index 4b6ff50..7aa6c40 100644
+--- a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
++++ b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
+@@ -23,7 +23,7 @@
+ //{jpg,png,bmp,pnm,pbm,pgm,ppm}
+ Fl_Image* loadImage(const char *filename)
+ {
+- char *suffix = strrchr(filename, '.');
++ const char *suffix = strrchr(filename, '.');
+ if (suffix == NULL)
+ return NULL;
+ if (strcmp(suffix,".jpg") == 0)
+diff --git a/toycars_vehicle_editor/src/VehicleObject.cpp b/toycars_vehicle_editor/src/VehicleObject.cpp
+index 3f61114..0bd2978 100644
+--- a/toycars_vehicle_editor/src/VehicleObject.cpp
++++ b/toycars_vehicle_editor/src/VehicleObject.cpp
+@@ -533,13 +533,13 @@ void VehicleObject::installVehicle(const char *name)
+ uninstallVehicle(name);
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(carname, temp+1, 255);
+ }
+@@ -610,13 +610,13 @@ void VehicleObject::uninstallVehicle(const char *name)
+ char *temp;
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(carname, temp+1, 255);
+ }
+@@ -675,4 +675,4 @@ void VehicleObject::uninstallVehicle(const char *name)
+ system(str);
+ */
+ #endif
+-}
+\ No newline at end of file
++}