plasma-workspace/plasma-workspace-5.19.4-gpsd-3.21.patch

27 lines
985 B
Diff
Raw Normal View History

From e3134289f522edb140797818fffd60d641b86cd8 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Wed, 5 Aug 2020 14:07:24 +0200
Subject: [PATCH] Fix build with gpsd 3.21
Adapt to API changes
---
dataengines/geolocation/location_gps.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dataengines/geolocation/location_gps.cpp b/dataengines/geolocation/location_gps.cpp
index 021c29ac5..476117ca3 100644
--- a/dataengines/geolocation/location_gps.cpp
+++ b/dataengines/geolocation/location_gps.cpp
@@ -65,7 +65,11 @@ void Gpsd::run()
if (m_gpsdata->online) {
#endif
//qDebug() << "online";
+#if GPSD_API_MAJOR_VERSION >= 10
+ if (m_gpsdata->fix.status != STATUS_NO_FIX) {
+#else
if (m_gpsdata->status != STATUS_NO_FIX) {
+#endif
//qDebug() << "fix";
d["accuracy"] = 30;
d["latitude"] = QString::number(m_gpsdata->fix.latitude);