Commit 7211ed5a authored by ivan tkachenko's avatar ivan tkachenko Committed by Heiko Becker
Browse files

Fix build with gpsd 3.23.1

STATUS_NO_FIX was renamed to STATUS_UNK.

https://gitlab.com/gpsd/gpsd/-/commit/d4a4d8d3606fd50f10bcd20096a8a0cdb8b2d427

Co-Authored-By: Vlad Zahorodnii's avatarVlad Zahorodnii <vlad.zahorodnii@kde.org>
(cherry picked from commit 8aadc3eb)
parent bd8f84fa
......@@ -79,7 +79,9 @@ void GpsdPositionProviderPlugin::update( gps_data_t data )
{
PositionProviderStatus oldStatus = m_status;
GeoDataCoordinates oldPosition = m_position;
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 10 )
#if defined(STATUS_UNK) // STATUS_NO_FIX was renamed to STATUS_UNK without bumping API version
if ( data.fix.status == STATUS_UNK || std::isnan( data.fix.longitude ) || std::isnan( data.fix.latitude ) )
#elif defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 10 )
if ( data.fix.status == STATUS_NO_FIX || std::isnan( data.fix.longitude ) || std::isnan( data.fix.latitude ) )
#else
if ( data.status == STATUS_NO_FIX || std::isnan( data.fix.longitude ) || std::isnan( data.fix.latitude ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment