From bbf9b2002132214145a484b8dc1327f98ca1fcbc Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Wed, 24 Jun 2020 11:42:53 +0200 Subject: [PATCH] Take care if the gpsd API version with gps_read() as function prototype as changed in version 7. --- NXDNGateway/APRSWriter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NXDNGateway/APRSWriter.cpp b/NXDNGateway/APRSWriter.cpp index cb67049..df2e347 100644 --- a/NXDNGateway/APRSWriter.cpp +++ b/NXDNGateway/APRSWriter.cpp @@ -228,8 +228,13 @@ void CAPRSWriter::sendIdFrameMobile() if (!::gps_waiting(&m_gpsdData, 0)) return; +#if GPSD_API_MAJOR_VERSION >= 7 if (::gps_read(&m_gpsdData, NULL, 0) <= 0) return; +#else + if (::gps_read(&m_gpsdData) <= 0) + return; +#endif if (m_gpsdData.status != STATUS_FIX) return;