X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fgps.c;h=4d65176836b24946e135a2112d7cfea147236aa4;hp=1d32d04926170a8fc654d4f20222403976776a92;hb=48efd3deb4c9139fd060ff3d289896e9031bcc7c;hpb=5a32acd88719481cc22aaecd36f3cbc11f3a3489 diff --git a/src/gps.c b/src/gps.c index 1d32d049..4d651768 100644 --- a/src/gps.c +++ b/src/gps.c @@ -27,8 +27,8 @@ **/ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include "utils_time.h" #define CGPS_TRUE 1 @@ -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++;