$NetBSD: patch-ac,v 1.1 2011/03/31 20:21:34 drochner Exp $

for gpsd-2.96

--- src/CDeviceGPSD.cpp.orig	2011-03-15 20:13:04.000000000 +0000
+++ src/CDeviceGPSD.cpp
@@ -138,6 +138,7 @@ CGPSDThread::CGPSDThread( int _pipe_fd )
 log_mutex( new QMutex() ),
 pipe_fd( _pipe_fd )
 {
+    gpsdata = &gpsdata_store;
 }
 
 
@@ -149,8 +150,8 @@ CGPSDThread::~CGPSDThread()
 
 void CGPSDThread::run()
 {
-    gpsdata = gps_open( "localhost", DEFAULT_GPSD_PORT );
-    if( !gpsdata )
+    int res = gps_open( "localhost", DEFAULT_GPSD_PORT, gpsdata );
+    if( res )
     {
         // TODO: message box (from other thread)
         qDebug() << "gps_open failed.";
@@ -187,7 +188,7 @@ void CGPSDThread::run()
             }                    // if
             else if( FD_ISSET( gpsdata->gps_fd, &fds ) )
             {
-                gps_poll( gpsdata );
+                gps_read( gpsdata );
                 if( !decodeData() ) break;
             }                    // else if
         }                        // else if
