1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

astro/foxtrotgps: fix build with new gpsd

PR:		258110
Approved by:	crwhipp@gmail.com (maintainer)
This commit is contained in:
Steve Wills 2022-03-13 20:16:08 -04:00
parent c77cd8547d
commit 3cb0fc7db4
2 changed files with 13 additions and 3 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= foxtrotgps
PORTVERSION= 1.2.2
PORTREVISION= 1
CATEGORIES= astro geography
MASTER_SITES= http://www.foxtrotgps.org/releases/

View File

@ -1,6 +1,6 @@
--- src/gps_functions.c.orig 2020-03-05 17:21:38 UTC
--- src/gps_functions.c.orig 2019-07-10 05:35:12 UTC
+++ src/gps_functions.c
@@ -735,6 +735,11 @@ cb_gpsd_io_error(GIOChannel *src, GIOCondition conditi
@@ -729,6 +729,11 @@ cb_gpsd_io_error(GIOChannel *src, GIOCondition conditi
}
@ -12,7 +12,7 @@
static gboolean
cb_gpsd_data(GIOChannel *src, GIOCondition condition, gpointer data)
@@ -755,7 +760,7 @@ cb_gpsd_data(GIOChannel *src, GIOCondition condition,
@@ -753,12 +758,16 @@ cb_gpsd_data(GIOChannel *src, GIOCondition condition,
{
gpsdata->satellites_used = libgps_gpsdata.satellites_used;
gpsdata->hdop = libgps_gpsdata.dop.hdop;
@ -21,3 +21,12 @@
if (isnan(gpsdata->fix.time))
{
gpsdata->fix.time = (time_t) 0;
}
+#if GPSD_API_MAJOR_VERSION >= 10
+ gpsdata->valid = (libgps_gpsdata.fix.status != STATUS_UNK);
+#else
gpsdata->valid = (libgps_gpsdata.status != STATUS_NO_FIX);
+#endif
if (gpsdata->valid)
{
gpsdata->seen_valid = TRUE;