26 lines
984 B
Diff
26 lines
984 B
Diff
From 1543af6c08bfca4ae5832b870503fe7fdc5f8b49 Mon Sep 17 00:00:00 2001
|
|
From: Joop Boonen <joop.boonen@boonen.org>
|
|
Date: Thu, 24 Jan 2019 22:07:13 +0100
|
|
Subject: [PATCH] Fix:Core:Fixed Added fix for gpsd >= 1.7
|
|
|
|
---
|
|
navit/vehicle/gpsd/vehicle_gpsd.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c
|
|
index 95324f324..99a4b4ffc 100644
|
|
--- navit/vehicle/gpsd/vehicle_gpsd.c
|
|
+++ navit/vehicle/gpsd/vehicle_gpsd.c
|
|
@@ -325,7 +325,11 @@ static void vehicle_gpsd_io(struct vehicle_priv *priv) {
|
|
int read_result;
|
|
/* Read until EOF, in case we are lagging behind.
|
|
* No point in processing old GPS reports. */
|
|
+#if GPSD_API_MAJOR_VERSION >= 7
|
|
+ while((read_result=gps_read(priv->gps, NULL, 0))>0);
|
|
+#else
|
|
while((read_result=gps_read(priv->gps))>0);
|
|
+#endif
|
|
if(read_result==-1) {
|
|
dbg(lvl_error,"gps_poll failed");
|
|
vehicle_gpsd_close(priv);
|