viking-1.6.2-gpsd-3.18-fix.patch 973 B

1234567891011121314151617181920212223242526
  1. --- orig/vikgpslayer.c 2015-12-15 00:34:43.000000000 +0100
  2. +++ src/vikgpslayer.c 2018-10-09 20:32:19.001703665 +0200
  3. @@ -1681,2 +1681,4 @@
  4. if (gps_read(&vgl->vgpsd->gpsd) > -1) {
  5. +#elif GPSD_API_MAJOR_VERSION >= 7
  6. + if (gps_read(&vgl->vgpsd->gpsd, NULL, 0) > -1) {
  7. // Reuse old function to perform operations on the new GPS data
  8. @@ -1713,2 +1715,12 @@
  9. +/**
  10. + * rt_gpsd_try_connect:
  11. + *
  12. + * ATM Known to work up to at least GPSD_API_MAJOR_VERSION 7
  13. + *
  14. + * Support for the old/very old GPSD API versions is increasingly subject
  15. + * to bitrot due to difficulty of creating/maintaining a test environment
  16. + * of old software versions
  17. + *
  18. + */
  19. static gboolean rt_gpsd_try_connect(gpointer *data)
  20. @@ -1724,3 +1736,3 @@
  21. if (gps_open_r(vgl->gpsd_host, vgl->gpsd_port, /*(struct gps_data_t *)*/vgl->vgpsd) != 0) {
  22. -#elif GPSD_API_MAJOR_VERSION == 5 || GPSD_API_MAJOR_VERSION == 6
  23. +#elif GPSD_API_MAJOR_VERSION >= 5
  24. vgl->vgpsd = g_malloc(sizeof(VglGpsd));