summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6341066)
raw | patch | inline | side by side (parent: 6341066)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 21 Nov 2015 10:16:05 +0000 (11:16 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 21 Nov 2015 10:16:05 +0000 (11:16 +0100) |
src/gps.c | patch | blob | history |
diff --git a/src/gps.c b/src/gps.c
index 944932ab27c7b9a3f7e34ffa840858e8b0cb3250..d0937c9836745db27901c39d2a8f0b097ff6ec36 100644 (file)
--- a/src/gps.c
+++ b/src/gps.c
{
err_count = 0;
+#if GPSD_API_MAJOR_VERSION > 4
int status = gps_open (config.host, config.port, &conn);
+#else
+ int status = gps_open_r (config.host, config.port, &conn);
+#endif
if (status < 0)
{
WARNING ("gps plugin: Connecting to %s:%s failed: %s",
while (1)
{
+#if GPSD_API_MAJOR_VERSION > 4
long timeout_ms = CDTIME_T_TO_MS (config.timeout);
if (!gps_waiting (&conn, (int) timeout_ms))
+#else
+ if (!gps_waiting (&conn))
+#endif
{
struct timespec pause_ns;
CDTIME_T_TO_TIMESPEC (config.pause, &pause_ns);