File Fix-build-with-gpsd-3.21.patch of Package kdebase4-workspace

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/plasma/generic/dataengines/geolocation/location_gps.cpp b/plasma/generic/dataengines/geolocation/location_gps.cpp
index 021c29ac5..476117ca3 100644
--- a/plasma/generic/dataengines/geolocation/location_gps.cpp
+++ b/plasma/generic/dataengines/geolocation/location_gps.cpp
@@ -65,7 +65,11 @@ void Gpsd::run()
             if (m_gpsdata->online) {
 #endif
                 //kDebug() << "online";
+#if GPSD_API_MAJOR_VERSION >= 10
+                if (m_gpsdata->fix.status != STATUS_NO_FIX) {
+#else
                 if (m_gpsdata->status != STATUS_NO_FIX) {
+#endif
                     //kDebug() << "fix";
                     d["accuracy"] = 30;
                     d["latitude"] = QString::number(m_gpsdata->fix.latitude);
-- 
GitLab

openSUSE Build Service is sponsored by