[Marble-commits] KDE/kdeedu/marble/src/plugins/positionprovider/gpsd

Dennis Nienhüser earthwings at gentoo.org
Fri Jan 1 17:33:25 CET 2010


SVN commit 1068583 by nienhueser:

Fix compiliatin for libgps < 2.90. libgps sets GPSD_API_MAJOR_VERSION=3 for both version 2.3x and 2.90. Check whether WATCH_ENABLE and POLICY_SET are defined to distinguish both.
BUG: 220489


 M  +2 -2      GpsdConnection.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp #1068582:1068583
@@ -25,7 +25,7 @@
 {
     gps_data_t* data = m_gpsd.open();
     if ( data ) {
-#if GPSD_API_MAJOR_VERSION == 3
+#if GPSD_API_MAJOR_VERSION == 3 && defined( WATCH_ENABLE ) 
         m_gpsd.stream( WATCH_ENABLE );
 #endif
         connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
@@ -39,7 +39,7 @@
     gps_data_t* data;
 #if GPSD_API_MAJOR_VERSION == 2
     data = m_gpsd.query( "o" );
-#elif GPSD_API_MAJOR_VERSION == 3
+#elif GPSD_API_MAJOR_VERSION == 3 && defined( POLICY_SET )
     while ((data = m_gpsd.poll()) && !(data->set & POLICY_SET)) {
         data = m_gpsd.poll();
     }


More information about the Marble-commits mailing list