diff options
author | Joseph Herlant <aerostitch@users.noreply.github.com> | 2020-01-18 14:02:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 14:02:51 -0800 |
commit | df8c2e319193ac3c7f8dda4082937b542e1f3a92 (patch) | |
tree | 9bf0adb5b642055d1a1d23764327d7322d8ee5fc | |
parent | 3882bc6e6af57b89e4783cc8a7e08a0539d0ece8 (diff) | |
download | navit-df8c2e319193ac3c7f8dda4082937b542e1f3a92.tar.gz |
vehicle:fix: add compatibility for gpsd 3.20 (#959)
* vehicle:fix: add compatibility for gpsd 3.20
* Fix spacing
-rw-r--r-- | navit/vehicle/gpsd/vehicle_gpsd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c index 99a4b4ffc..564d41695 100644 --- a/navit/vehicle/gpsd/vehicle_gpsd.c +++ b/navit/vehicle/gpsd/vehicle_gpsd.c @@ -174,7 +174,11 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len, data->set &= ~MODE_SET; } if (data->set & TIME_SET) { +#if GPSD_API_MAJOR_VERSION >= 9 + priv->fix_time = data->fix.time.tv_sec; +#else priv->fix_time = data->fix.time; +#endif data->set &= ~TIME_SET; } #ifdef HAVE_LIBGPS19 |