summaryrefslogtreecommitdiff
path: root/geography/viking/patches/patch-aa
blob: a1da0f4786a26930e52079c7ecc960f821e8c5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-aa,v 1.2 2012/01/26 01:00:14 gdt Exp $

--- src/gpspoint.c.orig	2010-12-13 01:55:55.000000000 +0000
+++ src/gpspoint.c
@@ -81,8 +81,25 @@ static gdouble line_altitude = VIK_DEFAU
 static gboolean line_visible = TRUE;
 
 static gboolean line_extended = FALSE;
+#if defined(__NetBSD__)
+#if __GNUC_PREREQ__(3,3)
+/*
+ * Work around a bug in NetBSD.  See PR standards/40695.  Bug is fixed
+ * in -current but not -5; revisit if the workaround causes problems.
+ */
+static gdouble line_speed = __builtin_nanf("");
+static gdouble line_course = __builtin_nanf("");
+#else /* _GNUC_PREREQ__(3,3) */
+/*
+ * gcc too old for workaround; defer fix to someone else.
+ */
+static gdouble line_speed = NAN;
+static gdouble line_course = NAN;
+#endif
+#else /* NetBSD */
 static gdouble line_speed = NAN;
 static gdouble line_course = NAN;
+#endif /* NetBSD */
 static gint line_sat = 0;
 static gint line_fix = 0;
 /* other possible properties go here */