File Fix-build-with-gpsd-3.18.patch of Package kdebase4-workspace
From 81a0fe6db9ac9044c2ec8a246878ec65651cb6dd Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Mon, 15 Oct 2018 20:14:01 +0200
Subject: Fix build with gpsd 3.18
The signature of gps_read has changed in 3.18 to add an optional buffer parameter.
Differential Revision: https://phabricator.kde.org/D16081
---
dataengines/geolocation/location_gps.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plasma/generic/dataengines/geolocation/location_gps.cpp b/plasma/generic/dataengines/geolocation/location_gps.cpp
index 22f6b27..f06865e 100644
--- a/plasma/generic/dataengines/geolocation/location_gps.cpp
+++ b/plasma/generic/dataengines/geolocation/location_gps.cpp
@@ -51,7 +51,9 @@ void Gpsd::run()
while (!m_abort) {
Plasma::DataEngine::Data d;
-#if GPSD_API_MAJOR_VERSION >= 5
+#if GPSD_API_MAJOR_VERSION >= 7
+ if (gps_read(m_gpsdata, NULL, 0) != -1) {
+#elif GPSD_API_MAJOR_VERSION >= 5
if (gps_read(m_gpsdata) != -1) {
#else
if (gps_poll(m_gpsdata) != -1) {
--
cgit v1.1