From 8f4f6fea0e8f06647b3e06c003069c93b5b033b4 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Apr 2011 04:14:07 +0000 Subject: Tue Apr 19 04:14:07 UTC 2011 --- community-testing/viking/gpsd-2.96.patch | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 community-testing/viking/gpsd-2.96.patch (limited to 'community-testing/viking/gpsd-2.96.patch') diff --git a/community-testing/viking/gpsd-2.96.patch b/community-testing/viking/gpsd-2.96.patch new file mode 100644 index 000000000..01b117312 --- /dev/null +++ b/community-testing/viking/gpsd-2.96.patch @@ -0,0 +1,47 @@ +diff -wbBur viking-1.1/configure.ac viking-1.1.my/configure.ac +--- viking-1.1/configure.ac 2011-02-08 21:29:01.000000000 +0000 ++++ viking-1.1.my/configure.ac 2011-04-18 13:31:07.000000000 +0000 +@@ -244,7 +244,7 @@ + [ac_cv_enable_realtimegpstracking], [ac_cv_enable_realtimegpstracking=yes]) + case $ac_cv_enable_realtimegpstracking in + yes) +- AC_CHECK_LIB(gps,gps_poll,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking])) ++ AC_CHECK_LIB(gps,gps_read,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking])) + AC_DEFINE(VIK_CONFIG_REALTIME_GPS_TRACKING, [], [REALTIME GPS TRACKING STUFF]) + ;; + esac +diff -wbBur viking-1.1/src/vikgpslayer.c viking-1.1.my/src/vikgpslayer.c +--- viking-1.1/src/vikgpslayer.c 2011-02-08 21:09:00.000000000 +0000 ++++ viking-1.1.my/src/vikgpslayer.c 2011-04-18 13:35:48.000000000 +0000 +@@ -1377,8 +1377,11 @@ + { + VikGpsLayer *vgl = data; + if (condition == G_IO_IN) { +- if (!gps_poll(&vgl->vgpsd->gpsd)) ++ if (!gps_read(&vgl->vgpsd->gpsd)) ++ { ++ gpsd_raw_hook(&vgl->vgpsd->gpsd, NULL); + return TRUE; ++ } + else { + g_warning("Disconnected from gpsd. Trying to reconnect"); + rt_gpsd_disconnect(vgl); +@@ -1408,7 +1411,8 @@ + { + VikGpsLayer *vgl = (VikGpsLayer *)data; + #ifndef HAVE_GPS_OPEN_R +- struct gps_data_t *gpsd = gps_open(vgl->gpsd_host, vgl->gpsd_port); ++ static struct gps_data_t __gd; ++ struct gps_data_t *gpsd = gps_open(vgl->gpsd_host, vgl->gpsd_port, &__gd) ? NULL : &__gd; + + if (gpsd == NULL) { + #else +@@ -1439,7 +1443,7 @@ + vik_trw_layer_add_track(vtl, vgl->realtime_track_name, vgl->realtime_track); + } + +- gps_set_raw_hook(&vgl->vgpsd->gpsd, gpsd_raw_hook); ++// gps_set_raw_hook(&vgl->vgpsd->gpsd, gpsd_raw_hook); + vgl->realtime_io_channel = g_io_channel_unix_new(vgl->vgpsd->gpsd.gps_fd); + vgl->realtime_io_watch_id = g_io_add_watch( vgl->realtime_io_channel, + G_IO_IN | G_IO_ERR | G_IO_HUP, gpsd_data_available, vgl); -- cgit v1.2.3-54-g00ecf