X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fgps.c;h=b22c3a2e5ecd505620709654b2bdaf1808b38262;hp=1d32d04926170a8fc654d4f20222403976776a92;hb=7111bb6df7628edce3a8e538b386fbe27633a191;hpb=3d082a905619c19ca5b7183bb95a30d4d9529c4d diff --git a/src/gps.c b/src/gps.c index 1d32d049..b22c3a2e 100644 --- a/src/gps.c +++ b/src/gps.c @@ -141,7 +141,12 @@ static void *cgps_thread(void *pData) { continue; } - if (gps_read(&gpsd_conn) == -1) { +#if GPSD_API_MAJOR_VERSION > 6 + if (gps_read(&gpsd_conn, NULL, 0) == -1) +#else + if (gps_read(&gpsd_conn) == -1) +#endif + { WARNING("gps plugin: incorrect data! (err_count: %d)", err_count); err_count++;