Committer: Paul Wise Author(s): Charles Curley Date: 2019-02-27 01:45:28 UTC Revision ID: pabs3@bonedaddy.net-20190227014528-44mjwq25ls853nrx Update the interface to gps_read() for gpsd API version 7 This change is available in gpsd version 3.18 and later. Kept deprecated code for users of older versions by using a version check. See-also: http://catb.org/gpsd/libgps.html === modified file 'src/gps_functions.c' --- src/gps_functions.c 2019-02-26 00:59:58 +0000 +++ src/gps_functions.c 2019-02-27 01:45:28 +0000 @@ -738,7 +738,11 @@ if (!libgps_initialized) return FALSE; +#if GPSD_API_MAJOR_VERSION >= 7 /* API change. gpsd version 3.18 and subsequent. */ + ret = gps_read(&libgps_gpsdata, NULL, 0); +#else ret = gps_read(&libgps_gpsdata); +#endif /* Note that gps_read() will never actually return 0 (zero-length reads are converted internally to a -1 return, since they mean that the connection to the daemon has closed),