plasma: fix issue #1

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-01-25 06:20:01 +00:00
parent 3d0b9b74d8
commit e1ebfc55d0

View file

@ -51,8 +51,10 @@ void Gpsd::run()
while (!m_abort) {
Plasma::DataEngine::Data d;
#if GPSD_API_MAJOR_VERSION >= 5
if (gps_read(m_gpsdata) != -1) {
#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) {
#endif