From f97ddc0b8bf18de1f08a5659cf824ef0f64e860b Mon Sep 17 00:00:00 2001 From: Vadim Raskhozhev Date: Tue, 16 Jul 2019 14:25:19 +0300 Subject: [PATCH] src/gpsdclient.cpp: made compatible with GPSD_API_MAJOR_VERSION >= 7 --- src/gpsdclient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gpsdclient.cpp b/src/gpsdclient.cpp index 1b00439..3dd542e 100644 --- a/src/gpsdclient.cpp +++ b/src/gpsdclient.cpp @@ -181,7 +181,11 @@ void florb::gpsdclient::worker(void) } // Read data +#if GPSD_API_MAJOR_VERSION >= 7 + if (gps_read(&m_gpsdata, NULL, 0) == -1) { +#else if (gps_read(&m_gpsdata) == -1) { +#endif // Error break; }