void-packages/srcpkgs/gpsbabel/patches/enigma.patch

18 lines
661 B
Diff

--- enigma.cc
+++ enigma.cc
@@ -23,0 +24,7 @@
+#include <cmath> // for fabs, lround
+#include <cstdint> // for int32_t, uint8_t, uint32_t
+#include <cstdlib> // for abs
+#include <cstring> // for strlen, memcpy, memset
+
+#include <QtCore/QString> // for QString
+
@@ -25,2 +32 @@
-#include <cmath>
-#include <cstdlib>
+#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
@@ -180 +186 @@ enigma_waypt_disp(const Waypoint* wpt)
- le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000);
+ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000);