aboutsummaryrefslogtreecommitdiff
path: root/astro/qlandkartegt
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2011-05-14 15:09:40 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2011-05-14 15:09:40 +0000
commit4d3b808ff8806de1e859b5b05836cde40a10a241 (patch)
treec1c771c0794c89286af0b1f138c416c64ce078d2 /astro/qlandkartegt
parentb4e2f6d31c75bbfce56b646ae90dfc1dfec40d56 (diff)
downloadports-4d3b808ff8806de1e859b5b05836cde40a10a241.tar.gz
ports-4d3b808ff8806de1e859b5b05836cde40a10a241.zip
Notes
Diffstat (limited to 'astro/qlandkartegt')
-rw-r--r--astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp b/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp
new file mode 100644
index 000000000000..94fa67203790
--- /dev/null
+++ b/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp
@@ -0,0 +1,47 @@
+Index: src/CDeviceGPSD.cpp
+===================================================================
+--- src/CDeviceGPSD.cpp (revision 2719)
++++ src/CDeviceGPSD.cpp (working copy)
+@@ -138,6 +138,7 @@
+ log_mutex( new QMutex() ),
+ pipe_fd( _pipe_fd )
+ {
++ gpsdata = NULL;
+ }
+
+
+@@ -149,7 +150,14 @@
+
+ void CGPSDThread::run()
+ {
++#if GPSD_API_MAJOR_VERSION >= 5
++ int socket;
++
++ if( gpsdata = new gps_data_t )
++ socket = gps_open( "localhost", DEFAULT_GPSD_PORT, gpsdata );
++#else
+ gpsdata = gps_open( "localhost", DEFAULT_GPSD_PORT );
++#endif
+ if( !gpsdata )
+ {
+ // TODO: message box (from other thread)
+@@ -187,13 +195,20 @@
+ } // if
+ else if( FD_ISSET( gpsdata->gps_fd, &fds ) )
+ {
++#if GPSD_API_MAJOR_VERSION >= 5
++ gps_read( gpsdata );
++#else
+ gps_poll( gpsdata );
++#endif
+ if( !decodeData() ) break;
+ } // else if
+ } // else if
+ } // while
+
+ gps_close( gpsdata );
++#if GPSD_API_MAJOR_VERSION >= 5
++ delete gpsdata;
++#endif
+ qDebug() << "thread done";
+ }