gpsbabel: fix build with llvm-4

+25 -2
+22
pkgs/applications/misc/gpsbabel/clang-4.patch
··· 1 + diff --git a/bushnell.cc b/bushnell.cc 2 + index 8fa844d..40707c4 100644 3 + --- a/bushnell.cc 4 + +++ b/bushnell.cc 5 + @@ -135,7 +135,7 @@ bushnell_get_icon_from_name(QString name) 6 + name = "Waypoint"; 7 + } 8 + 9 + - for (t = bushnell_icons; t->icon > 0; t++) { 10 + + for (t = bushnell_icons; t->icon != 0; t++) { 11 + if (0 == name.compare(t->icon, Qt::CaseInsensitive)) { 12 + return t->symbol; 13 + } 14 + @@ -147,7 +147,7 @@ static const char* 15 + bushnell_get_name_from_symbol(signed int s) 16 + { 17 + icon_mapping_t* t; 18 + - for (t = bushnell_icons; t->icon > 0; t++) { 19 + + for (t = bushnell_icons; t->icon != 0; t++) { 20 + if (s == t->symbol) { 21 + return t->icon; 22 + }
+3 -2
pkgs/applications/misc/gpsbabel/default.nix
··· 12 12 }; 13 13 14 14 patches = [ 15 + ./clang-4.patch 15 16 (fetchpatch { 16 17 url = https://sources.debian.net/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip; 17 18 sha256 = "03fpsmlx1wc48d1j405zkzp8j64hcp0z72islf4mk1immql3ibcr"; ··· 44 45 '' 45 46 # The raymarine and gtm tests fail on i686 despite -ffloat-store. 46 47 + lib.optionalString stdenv.isi686 "rm -v testo.d/raymarine.test testo.d/gtm.test;" 47 - # The tomtom asc test fails on darwin, see PR #23572. 48 - + lib.optionalString stdenv.isDarwin "rm -v testo.d/tomtom_asc.test;"; 48 + # The gtm, kml and tomtom asc tests fail on darwin, see PR #23572. 49 + + lib.optionalString stdenv.isDarwin "rm -v testo.d/gtm.test testo.d/kml.test testo.d/tomtom_asc.test"; 49 50 50 51 meta = with stdenv.lib; { 51 52 description = "Convert, upload and download data from GPS and Map programs";